http://d.puremagic.com/issues/show_bug.cgi?id=4938


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code, patch
                 CC|                            |clugd...@yahoo.com.au
            Summary|dmd segfault when compiling |Regression(2.047) dmd
                   |                            |segfault when compiling
           Severity|normal                      |regression


--- Comment #3 from Don <clugd...@yahoo.com.au> 2010-09-27 00:41:56 PDT ---
It's OK, I'm able to reproduce it.

TEST CASE
---------
void bug4938()
{
    try
    {
        return 0;
    }
    catch (Undefined4938 ee)
    {
        return 3;
    }
}
-----------

PATCH
statement.c, line 4132.
-----------
int TryCatchStatement::blockExit()
{
    assert(body);
    int result = body->blockExit();

    int catchresult = 0;
    for (size_t i = 0; i < catches->dim; i++)
    {
        Catch *c = (Catch *)catches->data[i];
+        if (c->type == Type::terror)
+            continue;
        catchresult |= c->blockExit();

        /* If we're catching Object, then there is no throwing
         */
+       assert(c->type->toBasetype()->isClassHandle());
        Identifier *id = c->type->toBasetype()->isClassHandle()->ident;

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

Reply via email to