diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-04-25 09:27:01 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-04-25 09:27:01 +0200 |
commit | 392594621391ab6dd6f6ccd4ad8a77b883c84a5b (patch) | |
tree | b0b530909370b7365616489af776c09b7d34fdc7 /gcc/loop-unroll.c | |
parent | 904588d85412c65250c7f6fe9947714b2c590b8b (diff) | |
download | gcc-392594621391ab6dd6f6ccd4ad8a77b883c84a5b.zip gcc-392594621391ab6dd6f6ccd4ad8a77b883c84a5b.tar.gz gcc-392594621391ab6dd6f6ccd4ad8a77b883c84a5b.tar.bz2 |
re PR rtl-optimization/80500 (ICE: internal consistency failure (error: invalid rtl sharing found in the insn))
PR rtl-optimization/80500
* loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on
sum's initial value.
* gcc.dg/pr80500.c: New test.
From-SVN: r247126
Diffstat (limited to 'gcc/loop-unroll.c')
-rw-r--r-- | gcc/loop-unroll.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c index dd5bdc5..3d48a8f 100644 --- a/gcc/loop-unroll.c +++ b/gcc/loop-unroll.c @@ -1913,6 +1913,9 @@ combine_var_copies_in_loop_exit (struct var_to_expand *ve, basic_block place) if (ve->var_expansions.length () == 0) return; + /* ve->reg might be SUBREG or some other non-shareable RTL, and we use + it both here and as the destination of the assignment. */ + sum = copy_rtx (sum); start_sequence (); switch (ve->op) { |