[Issue 2431] New: Internal error: ../ztc/cgcod.c 1031 when using -O

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 25 19:58:23 PDT 2008


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: bugzilla at digitalmars.com
        ReportedBy: moritzwarning at web.de


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.


-- 



More information about the Digitalmars-d-bugs mailing list