Bug 6556 – ICE for ImportStatement in DebugStatement

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
FreeBSD
Creation time
2011-08-25T18:51:00Z
Last change time
2011-08-28T00:51:30Z
Keywords
ice-on-valid-code
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2011-08-25T18:51:20Z
debug=BUG; void foo() { debug(BUG) import anything; } --- Import::semantic is assuming that the scope has a scope symbol and calls importScope on it. It segfaults because debug create a new scope without symbol. The correct fix seems to be calling importScope on the first enclosing scope that has a symbol. That way it behaves as Scope::insert(Dsymbol*).
Comment #1 by code — 2011-08-25T20:09:37Z
Comment #2 by bugzilla — 2011-08-28T00:51:30Z