[Issue 17619] [REG2.072] Wrong debug line information with single line loops

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 3 09:16:39 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=17619

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com

--- Comment #4 from Walter Bright <bugzilla at digitalmars.com> ---
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.

--


More information about the Digitalmars-d-bugs mailing list