Bug 1743 – interpret.c:1421 assertion failure on CTFE code

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-12-19T20:51:00Z
Last change time
2014-02-24T15:33:30Z
Keywords
ice-on-valid-code
Assigned to
bugzilla
Creator
daniel.keep+d.puremagic.com

Attachments

IDFilenameSummaryContent-TypeSize
217cr_test.dCauses assertion failuretext/plain3468

Comments

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.
Comment #3 by bugzilla — 2008-01-02T19:47:30Z
Fixed dmd 1.025 and 2.009