nvptx, libgfortran: Switch out of "minimal" mode
[official-gcc.git] / gcc / testsuite / gfortran.dg / matmul_bounds_5.f90
blobd2013ea906c255d26bf7c8e6cd3ba78e4894e249
1 ! { dg-do run }
2 ! { dg-options "-fbounds-check -fno-realloc-lhs" }
3 ! { dg-shouldfail "Fortran runtime error: Incorrect extent in return array in MATMUL intrinsic: is 3, should be 2" }
4 program main
5 real, dimension(2,3) :: a
6 real, dimension(3) :: b
7 real, dimension(:), allocatable :: ret
8 allocate (ret(2))
9 a = 1.0
10 b = 2.3
11 ret = matmul(a,b) ! This is OK
12 deallocate(ret)
13 allocate(ret(3))
14 ret = matmul(a,b) ! This should throw an error.
15 end program main
16 ! { dg-output "Fortran runtime error: Array bound mismatch for dimension 1 of array" }