PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / eoshift_bounds_1.f90
blobf32341556368cde4d8f537b36a921dc4082bdbf3
1 ! { dg-do run }
2 ! { dg-options "-fbounds-check" }
3 ! { dg-shouldfail "Incorrect size in SHIFT argument of EOSHIFT 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 = eoshift (a,sp(1:i)) ! Invalid
11 end program main
12 ! { dg-output "Fortran runtime error: Incorrect size in SHIFT argument of EOSHIFT intrinsic: should not be zero-sized" }