This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/47216] [4.6 Regression] gcc.dg/torture/pr43360.c FAILs with -O -fPIC -fgcse -fgcse-sm -fnon-call-exceptions -fno-tree-dse
- From: "zsojka at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 7 Jan 2011 21:50:33 +0000
- Subject: [Bug tree-optimization/47216] [4.6 Regression] gcc.dg/torture/pr43360.c FAILs with -O -fPIC -fgcse -fgcse-sm -fnon-call-exceptions -fno-tree-dse
- Auto-submitted: auto-generated
- References: <bug-47216-4@http.gcc.gnu.org/bugzilla/>
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_3@GOTPCREL[rip]
mov rdx, QWORD PTR l_5_5_2@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