This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/52406] [4.7 Regression] likely wrong code bug
- 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, 28 Feb 2012 10:14:57 +0000
- Subject: [Bug tree-optimization/52406] [4.7 Regression] likely wrong code bug
- Auto-submitted: auto-generated
- References: <bug-52406-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52406
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-28 10:14:57 UTC ---
Indeed, it is pcom that breaks it.
Before pcom we have:
MEM[(int *)&a + 4B] = 1;
D.1723_6 = a[1].f1;
but pcom doesn't consider the first store to be possibly affecting the load:
a_I_f1_lsm0.14_26 = a[1].f1;
<bb 5>:
# d_lsm0.12_12 = PHI <d_lsm0.12_18(6), d.13_5(4)>
MEM[(int *)&a + 4B] = 1;
D.1723_6 = a_I_f1_lsm0.14_26;