This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/70245] [6 Regression] Miscompilation of ICU on i386 with atom tuning starting with r227382
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Mar 2016 19:39:53 +0000
- Subject: [Bug middle-end/70245] [6 Regression] Miscompilation of ICU on i386 with atom tuning starting with r227382
- Auto-submitted: auto-generated
- References: <bug-70245-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70245
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-03-15
Ever confirmed|0 |1
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The difference between r227381 and r227382 on the testcase is:
--- r227382-1.s1 2016-03-15 20:34:52.699640513 +0100
+++ r227382-1.s2 2016-03-15 20:35:05.278470114 +0100
@@ -116,7 +116,7 @@ _ZL3barP1BPi:
movl 24(%esp), %edi
movl %eax, 24(%esp)
movl %edi, 12(%esp)
- movl (%edx), %ecx
+ movl (%edi), %ecx
movl %eax, (%esp)
addl %edx, %ecx
movl %ebp, 4(%esp)
which is the load of g->d in d's arguments, %edi at this point isn't equal to
g, while %edx is (you can see it a few insns later, g and f are not modified
after assignment and aren't addressable, thus they have the same value, and so
it is actually f + f->d, in the addition it is either correct %edx + (%edx), or
incorrect %edx + (%edi) where %edi happens to point to 0 instead of the right
4.