Bug 1200 – DMD crash: some statements containing only a ConditionalStatement with a false condition

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-04-28T11:07:00Z
Last change time
2014-02-16T15:23:19Z
Keywords
ice-on-valid-code
Assigned to
bugzilla
Creator
matti.niemenmaa+dbugzilla

Comments

Comment #0 by matti.niemenmaa+dbugzilla — 2007-04-28T11:07:34Z
void main() { do debug {} while (true); } void main() { while (true) debug {} } void main() { with (Object.init) debug {} } void main() { synchronized debug {} } void main() { volatile debug {} } Compile the above without -debug thrown and DMD crashes in the semantic3 stage. As far as I can tell, this happens only for the above statement types, but for all types of ConditionalStatement: debug, version, static if. It's easy to work around (hence severity is only "minor") by adding curly brackets surrounding the ConditionalStatement, for instance: void main() { volatile { debug {} } }
Comment #1 by bugzilla — 2007-07-01T13:59:26Z
Fixed DMD 1.018 and DMD 2.002