diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-06-16 09:11:37 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-06-16 09:11:37 +0200 |
commit | 67c2581668b93baed8e5b5e678656ce3ff306413 (patch) | |
tree | 0b04943e88b5c999735334d10b33e213d9b3661e /gcc/cse.c | |
parent | b189112fbbeeda82551fd71251728c107f2eeec5 (diff) | |
download | gcc-67c2581668b93baed8e5b5e678656ce3ff306413.zip gcc-67c2581668b93baed8e5b5e678656ce3ff306413.tar.gz gcc-67c2581668b93baed8e5b5e678656ce3ff306413.tar.bz2 |
re PR rtl-optimization/71532 (FAIL: gfortran.dg/select_char_1.f90 -O2 execution test)
PR rtl-optimization/71532
* cse.c (cse_insn): For const/pure calls, invalidate argument passing
memory slots.
* gcc.dg/torture/pr71532.c: New test.
From-SVN: r237503
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 (); } |