diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2008-11-23 19:25:42 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2008-11-23 19:25:42 +0000 |
commit | bd72cbc822b6ebc444552bfd221f2ab7fab7aa72 (patch) | |
tree | 8e04046feccd988d44cf864147388e601a376d4c /gcc | |
parent | 786a13d0d45ee319ca86ce8235d529478d70c568 (diff) | |
download | gcc-bd72cbc822b6ebc444552bfd221f2ab7fab7aa72.zip gcc-bd72cbc822b6ebc444552bfd221f2ab7fab7aa72.tar.gz gcc-bd72cbc822b6ebc444552bfd221f2ab7fab7aa72.tar.bz2 |
re PR libfortran/38234 (In Reshape, SOURCE can be bigger than result)
2008-11-23 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/38234
* intrinsics/reshape_generic.c (reshape_internal):
Source can be larger than shape.
* 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-23 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/38234
* gfortran.dg/reshape_4.f90: New test.
From-SVN: r142137
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/reshape_4.f90 | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8feb7be..a83c305 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-11-23 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR libfortran/38234 + * gfortran.dg/reshape_4.f90: New test. + 2008-11-22 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/38225 diff --git a/gcc/testsuite/gfortran.dg/reshape_4.f90 b/gcc/testsuite/gfortran.dg/reshape_4.f90 new file mode 100644 index 0000000..92208e5 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/reshape_4.f90 @@ -0,0 +1,15 @@ +! { dg-do run } +! { dg-options "-fbounds-check" } +program main + real, dimension(2,2) :: result + real, dimension(6) :: source + real, dimension(2) :: pad + + call random_number (source) + call random_number (pad) + + result = reshape(source, shape(result),pad=pad(1:0)) + result = reshape(source, shape(result)) + result = reshape(source, shape(result),pad=pad) + +end program main |