aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2008-11-22 21:41:27 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2008-11-22 21:41:27 +0000
commita388c77976fdac5a5773a9b71ee5f1644352a362 (patch)
tree6eef96808a54ab0bd4ddf78411a3d8f3000cd141 /gcc
parent2ec855f1f74eb35dc8e2909b837ff7d8888d2220 (diff)
downloadgcc-a388c77976fdac5a5773a9b71ee5f1644352a362.zip
gcc-a388c77976fdac5a5773a9b71ee5f1644352a362.tar.gz
gcc-a388c77976fdac5a5773a9b71ee5f1644352a362.tar.bz2
re PR libfortran/38225 (RESHAPE bounds with multi-dimensional SOURCE)
2008-11-22 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/38225 * intrinsics/reshape_generic.c (reshape_internal): Use all dimensions of source for bounds checking. * m4/reshape.m4: Likewise. * generated/reshape_c10.c Regenerated. * generated/reshape_c16.c Regenerated. * generated/reshape_c4.c Regenerated. * generated/reshape_c8.c Regenerated. * generated/reshape_i16.c Regenerated. * generated/reshape_i4.c Regenerated. * generated/reshape_i8.c Regenerated. * generated/reshape_r10.c Regenerated. * generated/reshape_r16.c Regenerated. * generated/reshape_r4.c Regenerated. * generated/reshape_r8.c Regenerated. 2008-11-22 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/38225 * gfortran.dg/reshape_3.f90: New test. From-SVN: r142125
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/reshape_3.f9012
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3b5fae6..8feb7be 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-22 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR libfortran/38225
+ * gfortran.dg/reshape_3.f90: New test.
+
2008-11-22 Tobias Burnus <burnus@net-b.de>
PR fortran/38160
diff --git a/gcc/testsuite/gfortran.dg/reshape_3.f90 b/gcc/testsuite/gfortran.dg/reshape_3.f90
new file mode 100644
index 0000000..a9f44b4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/reshape_3.f90
@@ -0,0 +1,12 @@
+! { dg-do run }
+! { dg-options "-fbounds-check" }
+program main
+ implicit none
+ integer, dimension(2,2) :: a4
+ integer(kind=1), dimension(2,2) :: a1
+ character(len=100) line
+ data a4 /1, 2, 3, 4/
+ a1 = a4
+ write (unit=line,fmt='(4I3)') reshape(a4,(/4/))
+ write (unit=line,fmt='(4I3)') reshape(a1,(/4/))
+end program main