summaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-24 04:53:47 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-24 04:53:47 +0000
commit3992540609daf52db67593a2f4d2c95a537b991d (patch)
tree36e0e1beb53d3b5105244a2db6d150d25ae7c770 /gcc/expmed.c
parentdb7345d5dae518d96f77a5bb23845677e7783767 (diff)
downloadgcc-3992540609daf52db67593a2f4d2c95a537b991d.tar.gz
PR rtl-optimization/36006
* expmed.c (store_fixed_bit_field): Copy op0 rtx before moving temp to op0 in order to avoid invalid rtx sharing. testsuite/ChangeLog: PR rtl-optimization/36006 * gfortran.dg/pr36006-1.f90: New test. * gfortran.dg/pr36006-2.f90: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134618 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index d5d2d528ca0..5268b318f8d 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -976,7 +976,10 @@ store_fixed_bit_field (rtx op0, unsigned HOST_WIDE_INT offset,
}
if (op0 != temp)
- emit_move_insn (op0, temp);
+ {
+ op0 = copy_rtx (op0);
+ emit_move_insn (op0, temp);
+ }
}
/* Store a bit field that is split across multiple accessible memory objects.