http://d.puremagic.com/issues/show_bug.cgi?id=5656
Summary: dmd fails to compile optimized foreach over a big enum Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: jens.k.muel...@gmx.de --- Comment #0 from jens.k.muel...@gmx.de 2011-02-26 14:28:45 PST --- Created an attachment (id=923) Test program that fails to compile Compiling the attached file with $ dmd -O -c test.d fails with Internal error: ../ztc/blockopt.c 619 If you disable the optimization it works, i.e. $ dmd -c test.d If the enum contains more than 197 elements it fails. Don't know why this number. Though such a big enum may be very artificial, you can run into the same problem if you nest foreach of smaller enums (see the commented out code in the attached file). $ dmd | head -1 Digital Mars D Compiler v2.051 I could not reproduce the problem in dmd v2.039. But it also exists in v2.047. I haven't checked any dmd between v2.039 and v2.047. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------