Thread overview
[Issue 2102] New: Invalid code generated with nested delegates
May 12, 2008
d-bugmail
Jun 16, 2008
d-bugmail
Aug 05, 2010
Iain Buclaw
May 12, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2102

           Summary: Invalid code generated with nested delegates
           Product: DGCC aka GDC
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn@users.sf.net
        ReportedBy: jeffdavey@submersion.com


Currently on Ubuntu 8.04 with the packaged GDC 4.2.3, given this code:

import tango.io.Stdout;
void main()
{
    char[] blah;

    void myFunc()
    {
        void myOtherFunc()
        {
            blah ~= "Hello there";
            Stdout(blah).newline;
        }
        myOtherFunc;
    }
    myFunc;
}

It segfaults when trying to access "blah" in the myOtherFunc delegate.

Using a separate Ubuntu 7.10 box with GDC 4.1, it works as expected (I see
"Hello There").


-- 

June 16, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2102





------- Comment #1 from bugzilla@digitalmars.com  2008-06-16 18:04 -------
This does work correctly with dmd.


-- 

August 05, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2102


Iain Buclaw <ibuclaw@ubuntu.com> changed:

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


--- Comment #2 from Iain Buclaw <ibuclaw@ubuntu.com> 2010-08-05 14:49:19 PDT ---
This works correctly using gdc with gcc-4.1.2 and gcc-4.3.5, which has now superseded gdc-4.2 in Ubuntu and Debian.

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