www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4655] New: goto to a try block ICEs

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4655

           Summary: goto to a try block ICEs
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: baseball.mjp gmail.com


--- Comment #0 from Michael P <baseball.mjp gmail.com> 2010-08-16 12:43:27 PDT
---
This is most likely related to something done for Issue 4339.

void main()
{   
    goto L1;
    try 
    { 
        L1:
            int a;
    }
    catch { }
}

produces:

Internal error: ../ztc/cgcod.c 989

This is a regression, as the error "test.d(6): Error: cannot goto forward into
different try block level" is raised in 1.062.

Note that moving the "goto L1;" line below the try/catch/finally produces the
error "test.d(9): Error: cannot goto into try block" on both dmd 1.062 and
1.063.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 16 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4655



--- Comment #1 from Michael P <baseball.mjp gmail.com> 2010-08-16 12:48:49 PDT
---
It may also be related to Issue 235. The code posted there has the same
behaviour as what is posted here.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 16 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4655


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #2 from Don <clugdbug yahoo.com.au> 2010-08-20 03:35:55 PDT ---
Silly mistake in the implementation of forward references, in the patch for
4339. It remembers the block the label is in, when it should be recording the
block which it was referenced from.

PATCH: s2ir.c, line 107, labelToBlock()

            // Keep track of the forward reference to this block, so we can
check it later
            if (!s->fwdrefs)
                s->fwdrefs = new Array();
-            s->fwdrefs->push(s->lblock);
+            s->fwdrefs->push(blx->curblock);
        }
    }
    return s->lblock;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 20 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4655


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


--- Comment #3 from Walter Bright <bugzilla digitalmars.com> 2010-08-26
23:27:30 PDT ---
http://www.dsource.org/projects/dmd/changeset/631

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 26 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4655


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw ubuntu.com


--- Comment #4 from Don <clugdbug yahoo.com.au> 2010-09-04 18:31:38 PDT ---
*** Issue 4811 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: -------
Sep 04 2010