Comment #0 by daniel.keep+d.puremagic.com — 2007-12-19T20:51:26Z
When the attached source file is compiled with DMD 1.024 on Windows XP, the compiler generates the following output:
Assertion failure: 'v' on line 1421 in file 'interpret.c'
abnormal program termination
Sorry the test case is so large; it's very, very difficult to cut down CTFE examples when it's almost impossible to tell why something is or is not evaluable at compile-time (hint, hint! :P)
Comment #1 by daniel.keep+d.puremagic.com — 2007-12-19T20:52:26Z
Created attachment 217
Causes assertion failure
Compiled with the following:
dmd cr_test
Comment #2 by matti.niemenmaa+dbugzilla — 2007-12-20T04:16:46Z
Brought it down to the following:
struct PR
{
}
int crRegister_ctfe()
{
PR pr;
pr = PR();
return 0;
}
const i = crRegister_ctfe();
The problem appears to be assigning a struct literal to an already-declared variable. "PR pr = PR();" works fine.