Bug 12933 – [D1] ICE with default __FILE__ and __LINE__
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2014-06-16T13:47:00Z
Last change time
2014-06-16T21:59:39Z
Keywords
ice-on-invalid-code, industry
Assigned to
nobody
Creator
public
Comments
Comment #0 by public — 2014-06-16T13:47:46Z
Fixing https://issues.dlang.org/show_bug.cgi?id=12641 has introduced new compiler ICE:
=====
class Test
{
this(char[] msg, char[] file = __FILE__, long line = __LINE__)
{
}
}
void foo ( T ) ( )
{
auto e = new T;
}
void main()
{
foo!(Test)();
}
=====
dmd1: expression.c:833: void expToCBuffer(OutBuffer*, HdrGenState*, Expression*, PREC): Assertion `precedence[e->op] != PREC_zero' failed.
Aborted (core dumped)
This code shouldn't compile of course but ICE makes finding exact point of origin very hard.
Comment #1 by github-bugzilla — 2014-06-16T19:03:43Z