diff options
author | Jeff Law <law@redhat.com> | 2014-01-10 15:13:18 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2014-01-10 15:13:18 -0700 |
commit | 7e41c852e38703c9a7f9ec1d4c513d781f1e46a6 (patch) | |
tree | a0b2ee5cd9b29270bf09ee2463c088556c88e09c /gcc/ree.c | |
parent | b270b096a14b869e59e10ca879b5cffa65ea3fd5 (diff) | |
download | gcc-7e41c852e38703c9a7f9ec1d4c513d781f1e46a6.zip gcc-7e41c852e38703c9a7f9ec1d4c513d781f1e46a6.tar.gz gcc-7e41c852e38703c9a7f9ec1d4c513d781f1e46a6.tar.bz2 |
re PR middle-end/59743 (ICE: Segmentation fault)
PR middle-end/59743
* ree.c (combine_reaching_defs): Ensure the defining statement
occurs before the extension when optimizing extensions with
different source and destination hard registers.
PR middle-end/59743
* gcc.c-torture/compile/pr59743.c: New test.
From-SVN: r206545
Diffstat (limited to 'gcc/ree.c')
-rw-r--r-- | gcc/ree.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -723,8 +723,10 @@ combine_reaching_defs (ext_cand *cand, const_rtx set_pat, ext_state *state) /* The defining statement and candidate insn must be in the same block. This is merely to keep the test for safety and updating the insn - stream simple. */ - if (BLOCK_FOR_INSN (cand->insn) != BLOCK_FOR_INSN (def_insn)) + stream simple. Also ensure that within the block the candidate + follows the defining insn. */ + if (BLOCK_FOR_INSN (cand->insn) != BLOCK_FOR_INSN (def_insn) + || DF_INSN_LUID (def_insn) > DF_INSN_LUID (cand->insn)) return false; /* If there is an overlap between the destination of DEF_INSN and |