http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48770

--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> 2011-04-26 14:57:08 
UTC ---
(gdb) disassemble
...
   0x0000000000400d06 <+18>:    addq   $0x1,(%rax)
   0x0000000000400d0a <+22>:    mov    $0x8,%eax
   0x0000000000400d0f <+27>:    test   %edi,%edi
   0x0000000000400d11 <+29>:    jne    0x400d51 <test_goto2(int)+93>
...
   0x0000000000400d50 <+92>:    retq   
=> 0x0000000000400d51 <+93>:    mov    (%rax),%rcx
   0x0000000000400d54 <+96>:    add    $0x1,%rcx
   0x0000000000400d58 <+100>:   mov    0x202461(%rip),%rdx        # 0x6031c0
   0x0000000000400d5f <+107>:   mov    $0x1,%eax
   0x0000000000400d64 <+112>:   jmp    0x400d15 <test_goto2(int)+33>

In the asm output, the problem is apparent (comparing trunk and 4.6 output) -
the only difference is:
73,75c73,76
<       mov     rcx, QWORD PTR [rax]    # *.LPBX1_I_lsm.7, *.LPBX1
<       add     rcx, 1  # *.LPBX1_I_lsm.7,
<       mov     rdx, QWORD PTR .LPBX1[rip+32]   # *.LPBX1_I_lsm.6, *.LPBX1
---
>       lea     rax, .LPBX1[rip+24]     # tmp113,
>       mov     rcx, QWORD PTR [rax]    # *.LPBX1, *.LPBX1
>       add     rcx, 1  # *.LPBX1_I_lsm.4,
>       mov     rdx, QWORD PTR .LPBX1[rip+32]   # *.LPBX1_I_lsm.3, *.LPBX1

Instruction "lea" is missing, and rax contains value 8.

Reply via email to