Bug 6871 – [minimal testcase] expression.c:1432: virtual dinteger_t IntegerExp::toInteger(): Assertion `0' failed

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2011-11-01T04:15:00Z
Last change time
2011-11-01T04:29:45Z
Keywords
ice-on-invalid-code
Assigned to
nobody
Creator
leandro.lucarella

Comments

Comment #0 by leandro.lucarella — 2011-11-01T04:15:25Z
This is in DMD 1.071: $ cat t.d void f() { for (int i = 0; i < x.length; i++) { } } $ dmd -c t.d t.d(2): Error: undefined identifier x, did you mean function f? _error_ 0x8edf468 dmd: expression.c:1432: virtual dinteger_t IntegerExp::toInteger(): Assertion `0' failed. Aborted
Comment #1 by leandro.lucarella — 2011-11-01T04:21:42Z
An even simpler testcase: void f() { while (x.length) { } }
Comment #2 by leandro.lucarella — 2011-11-01T04:22:11Z
BTW, compiling DMD in "debug mode" hides the assertion :S
Comment #3 by leandro.lucarella — 2011-11-01T04:29:45Z
OK, it seems that only the makefile is broken, after rebuilding all DMD I can't reproduce the bug anymore. I guess some files weren't rebuilt after I updated the git repo and that's what was causing the problem.