http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47216
--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> 2011-01-07 21:50:30
UTC ---
At the assembly level:
func_1:
mov rax, QWORD PTR g...@gotpcrel[rip]
mov rdx, QWORD PTR l_5_...@gotpcrel[rip]
mov ecx, DWORD PTR [rdx] # ecx = 4
lea edx, 7[rcx] # edx = 4+7 = 11
mov DWORD PTR [rax], edx # g_3[0][0] = edx = 11
cmp edx, 7
jg .L4 # jump taken
.L3:
mov DWORD PTR [rax], edx
jmp .L3
.L4:
# this instruction overwrites previously stored 11 by 4
mov DWORD PTR [rax], ecx # g_3[0][0] = ecx = 4
ret