diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2008-04-24 06:53:47 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2008-04-24 06:53:47 +0200 |
commit | 4679504c63fdc21e4c8580c6057ff55de41975b4 (patch) | |
tree | 36e0e1beb53d3b5105244a2db6d150d25ae7c770 /gcc/expmed.c | |
parent | 6412ecdc939b8abdc3c713a83b38928b3567b2ce (diff) | |
download | gcc-4679504c63fdc21e4c8580c6057ff55de41975b4.zip gcc-4679504c63fdc21e4c8580c6057ff55de41975b4.tar.gz gcc-4679504c63fdc21e4c8580c6057ff55de41975b4.tar.bz2 |
re PR rtl-optimization/36006 (invalid rtl sharing with -O2)
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.
From-SVN: r134618
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index d5d2d52..5268b31 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. |