D issues are now
tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Summary: |
interpret.c:1421 assertion failure on CTFE code |
Product: |
D
|
Reporter: |
Daniel Keep <daniel.keep+d.puremagic.com> |
Component: |
dmd | Assignee: |
Walter Bright <bugzilla> |
Status: |
RESOLVED
FIXED
|
Severity: |
normal
|
Keywords: |
ice-on-valid-code |
Priority: |
P2
|
Version: |
D1 (retired) |
Hardware: |
x86 |
OS: |
Windows |
Attachments: |
Causes assertion failure
|
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 2
Matti Niemenmaa
2007年12月20日 04:16:46 UTC
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.
Comment 3
Walter Bright
2008年01月02日 19:47:30 UTC
Fixed dmd 1.025 and 2.009