This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/71732] FAIL: gcc.dg/torture/pr71532.c at -O2 and above
- From: "danglin at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 10 Jul 2016 17:30:38 +0000
- Subject: [Bug middle-end/71732] FAIL: gcc.dg/torture/pr71532.c at -O2 and above
- Auto-submitted: auto-generated
- References: <bug-71732-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71732
--- Comment #4 from John David Anglin <danglin at gcc dot gnu.org> ---
--- gcc/cse.c.jj 2016-05-20 09:05:08.000000000 +0200
+++ gcc/cse.c 2016-06-15 16:01:21.568523552 +0200
@@ -5751,6 +5751,13 @@ cse_insn (rtx_insn *insn)
{
if (!(RTL_CONST_OR_PURE_CALL_P (insn)))
invalidate_memory ();
+ else
+ /* For const/pure calls, invalidate any argument slots, because
+ those are owned by the callee. */
+ for (tem = CALL_INSN_FUNCTION_USAGE (insn); tem; tem = XEXP (tem, 1))
+ if (GET_CODE (XEXP (tem, 0)) == USE
+ && MEM_P (XEXP (XEXP (tem, 0), 0)))
+ invalidate (XEXP (XEXP (tem, 0), 0), VOIDmode);
invalidate_for_call ();
}
I think a similar change is needed in cselib_process_insn.