[Issue 10624] New: [REG2.064a] ICE with tuple comparison
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jul 12 09:32:44 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10624
Summary: [REG2.064a] ICE with tuple comparison
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: ice
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-07-12 09:32:43 PDT ---
The regression was caused by:
https://github.com/D-Programming-Language/dmd/commit/d9c710351028452533241e069bdde9034fc4cde8
Following code causes ICE with -c switch.
$ dmd -c test.d
Internal error: backend\cod3.c 1953
With debug build dmd:
$ dmd -c test.d
DMD v2.064 DEBUG
el:00382D4C cnt=0 cs=0 < TYbool 00382E64 00382CA4
el:00382E64 cnt=0 cs=0 * 1 TYstruct 003820D8
el:003820D8 cnt=1 cs=0 var TY* zis
el:00382CA4 cnt=0 cs=0 * 1 TYstruct 00382C6C
el:00382C6C cnt=1 cs=0 var TY* rhsPA
TYstruct Internal error: backend\cod3.c 1953
struct Msg {}
struct Tuple(Specs...)
{
Specs expand;
alias expand this;
}
void main()
{
Variant data;
data = Tuple!Msg();
}
struct Variant
{
ptrdiff_t function() fptr = &handler!(void);
static ptrdiff_t handler(A : void)()
{
return 0;
}
static ptrdiff_t handler(A)()
{
A* zis;
A* rhsPA;
{
return *zis < *rhsPA ? -1 : 1;
// Tupple!(Msg) < Tupple!(Msg)
// Tupple!(Msg).expand < Tupple!(Msg).expand
// CmpExp(TOKtuple, TOKtuple) is incorrectly compiled in front-end
}
return 0;
}
Variant opAssign(T)(T rhs)
{
fptr = &handler!(T);
return this;
}
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list