Bug 9291 – [ICE][REG] throwing undefined identifier with nothrow crashes dmd

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-10T10:08:00Z
Last change time
2013-01-12T22:49:34Z
Keywords
ice, pull
Assigned to
andrej.mitrovich
Creator
monarchdodra
See also
http://d.puremagic.com/issues/show_bug.cgi?id=8675

Comments

Comment #0 by monarchdodra — 2013-01-10T10:08:06Z
//---- void foo() nothrow { throw new Hello(); } //---- Produces: //---- main.d(3): Error: undefined identifier Hello Assertion failure: 'cd' on line 5048 in file 'statement.c' abnormal program termination //---- This is a regression introduced in 2.061, which was probably caused by: http://d.puremagic.com/issues/show_bug.cgi?id=8675 https://github.com/D-Programming-Language/dmd/commit/d77b7c2bf456e99495d8a6644a6304995d1a3b20 In 2.060, the error produced is: //---- main.d(3): Error: undefined identifier Hello main.d(3): Error: _error_ is thrown but not caught main.d(1): Error: function main.foo 'foo' is nothrow yet may throw //----
Comment #1 by andrej.mitrovich — 2013-01-10T10:20:42Z
Comment #2 by github-bugzilla — 2013-01-11T00:36:14Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3e585b4c79fdfb34bb5f75da935783ecb80a74d9 Fixes Issue 9291 - ICE on throwing undefined identifier. https://github.com/D-Programming-Language/dmd/commit/1eb2bf2ebf8203ea5fdf7fe92aa946bbde6e9c30 Merge pull request #1461 from AndrejMitrovic/Fix9291 Issue 9291 - ICE on throwing undefined identifier
Comment #3 by monarchdodra — 2013-01-11T00:49:15Z
Confirmed fixed.
Comment #4 by yebblies — 2013-01-12T22:49:34Z
*** Issue 9095 has been marked as a duplicate of this issue. ***