aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr36006-1.f90
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2008-04-24 06:53:47 +0200
committerUros Bizjak <uros@gcc.gnu.org>2008-04-24 06:53:47 +0200
commit4679504c63fdc21e4c8580c6057ff55de41975b4 (patch)
tree36e0e1beb53d3b5105244a2db6d150d25ae7c770 /gcc/testsuite/gfortran.dg/pr36006-1.f90
parent6412ecdc939b8abdc3c713a83b38928b3567b2ce (diff)
downloadgcc-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/testsuite/gfortran.dg/pr36006-1.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/pr36006-1.f9023
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr36006-1.f90 b/gcc/testsuite/gfortran.dg/pr36006-1.f90
new file mode 100644
index 0000000..ad33d94
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr36006-1.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+!
+subroutine test4
+ integer, parameter :: wp = 4
+ complex(wp), parameter :: i = (0._wp, 1._wp)
+ complex(wp) :: c(12)
+ integer :: m, N
+
+ N = 12
+ c = (/(exp(i*m),m=1,N)/)
+ print *, c(1)
+end
+
+subroutine test8
+ integer, parameter :: wp = 8
+ complex(wp), parameter :: i = (0._wp, 1._wp)
+ complex(wp) :: c(12)
+ integer :: m, N
+
+ N = 12
+ c = (/(exp(i*m),m=1,N)/)
+ print *, c(1)
+end