https://issues.dlang.org/show_bug.cgi?id=17619
Walter Bright <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #4 from Walter Bright <[email protected]> --- Looking at the x86 output: 0000: enter 010h,0 0004: mov dword ptr -010h[EBP],0 3 000b: mov dword ptr -0Ch[EBP],3 0012: mov EAX,-010h[EBP] 0015: cmp EAX,-0Ch[EBP] 0018: jge $+Fh 001a: mov ECX,-010h[EBP] 001d: mov -8[EBP],ECX 0020: inc dword ptr -8[EBP] 4 0023: inc dword ptr -010h[EBP] 6 0026: jmp short $+FFFFFFEBh 0028: xor EDX,EDX 002a: mov -4[EBP],EDX 002d: mov EAX,EDX 002f: leave 7 0030: ret Line 6 is the `int bad;` line. This happens also if the foreach is rewritten as a for loop. --
