diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/cshift_bounds_2.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/cshift_bounds_2.f90 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/cshift_bounds_2.f90 b/gcc/testsuite/gfortran.dg/cshift_bounds_2.f90 new file mode 100644 index 000000000..0f3c75f4e --- /dev/null +++ b/gcc/testsuite/gfortran.dg/cshift_bounds_2.f90 @@ -0,0 +1,11 @@ +! { dg-do run } +! { dg-options "-fbounds-check -fno-realloc-lhs" } +! { dg-shouldfail "Incorrect extent in return value of CSHIFT intrinsic in dimension 2: is 3, should be 2" } +program main + integer, dimension(:,:), allocatable :: a, b + allocate (a(2,2)) + allocate (b(2,3)) + a = 1 + b = cshift(a,1) +end program main +! { dg-output "Fortran runtime error: Incorrect extent in return value of CSHIFT intrinsic in dimension 2: is 3, should be 2" } |