PR target/83368
[official-gcc.git] / gcc / testsuite / gfortran.dg / cshift_bounds_3.f90
blob33e387f32485f165d32eab73d979f7b547a21aef
1 ! { dg-do run }
2 ! { dg-options "-fbounds-check" }
3 ! { dg-shouldfail "Incorrect size in SHIFT argument of CSHIFT intrinsic: should not be zero-sized" }
4 program main
5 real, dimension(1,0) :: a, b, c
6 integer :: sp(3), i
7 a = 4.0
8 sp = 1
9 i = 1
10 b = cshift (a,sp(1:i)) ! Invalid
11 end program main
12 ! { dg-output "Fortran runtime error: Incorrect size in SHIFT argument of CSHIFT intrinsic: should not be zero-sized" }