https://issues.dlang.org/show_bug.cgi?id=12933
Issue ID: 12933
Summary: [D1] ICE with default __FILE__ and __LINE__
Product: D
Version: D1
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
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.
--