Thread overview
[Issue 9291] New: [ICE] throwing undefined identifier with nothrow crashes dmd
[Issue 9291] [ICE][REG] throwing undefined identifier with nothrow crashes dmd
Jan 10, 2013
Andrej Mitrovic
Jan 13, 2013
yebblies
January 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9291

           Summary: [ICE] throwing undefined identifier with nothrow
                    crashes dmd
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: monarchdodra@gmail.com


--- Comment #0 from monarchdodra@gmail.com 2013-01-10 10:08:06 PST ---
//----
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
//----

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9291


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |andrej.mitrovich@gmail.com
         AssignedTo|nobody@puremagic.com        |andrej.mitrovich@gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-01-10 10:20:42 PST ---
https://github.com/D-Programming-Language/dmd/pull/1461

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 11, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9291



--- Comment #2 from github-bugzilla@puremagic.com 2013-01-11 00:36:14 PST ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 11, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9291


monarchdodra@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #3 from monarchdodra@gmail.com 2013-01-11 00:49:15 PST ---
Confirmed fixed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 13, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9291


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs@eml.cc


--- Comment #4 from yebblies <yebblies@gmail.com> 2013-01-13 17:49:34 EST ---
*** Issue 9095 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------