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

           Summary: Internal error: ../ztc/cgcod.c 1031 when using -O
           Product: D
           Version: 1.035
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The following code triggers this error when compiled with -O:

void trigger(char[] txt)
{
        txt[0] = 'x';

        scope(exit)
        {
                txt[0] = 'x';
        }

        return;
}

Removing return or moving scope(exit) to the top of the body fixes the problem.
Tested on Debian GNU Linux.


-- 

Reply via email to