This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/50078] [4.6/4.7 Regression] combine wrong code: volatile accesses optimized out
- From: "steven at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 11 Sep 2011 15:47:21 +0000
- Subject: [Bug rtl-optimization/50078] [4.6/4.7 Regression] combine wrong code: volatile accesses optimized out
- Auto-submitted: auto-generated
- References: <bug-50078-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50078
--- Comment #8 from Steven Bosscher <steven at gcc dot gnu.org> 2011-09-11 15:47:21 UTC ---
(In reply to comment #7)
> Comes from SSA expand => Matz
Comes from SSA expand because it is already wrong in the .expand dump:
;; MEM[(volatile unsigned int *)&var][arg_1(D)] ={v} v_2;
(insn 9 8 10 (set (reg:DI 63)
(sign_extend:DI (reg/v:SI 60 [ argD.1604 ]))) t.c:6 -1
(nil))
(insn 10 9 11 (set (reg/f:DI 64)
(symbol_ref:DI ("var") <var_decl 0x7f4b8054f140 var>)) t.c:6 -1
(nil))
(insn 11 10 0 (set (mem/s:SI (plus:DI (mult:DI (reg:DI 63)
(const_int 4 [0x4]))
(reg/f:DI 64)) [2 varD.1603 S4 A32])
(reg/v:SI 59 [ vD.1607 ])) t.c:6 -1
(nil))
It seems to me that the MEM in insn 11 should be mem/s/v.