annotate gcc/testsuite/gfortran.dg/matmul_bounds_5.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900 (2017-10-27)
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do run }
kono
parents:
diff changeset
2 ! { dg-options "-fbounds-check -fno-realloc-lhs" }
kono
parents:
diff changeset
3 ! { dg-shouldfail "Fortran runtime error: Incorrect extent in return array in MATMUL intrinsic: is 3, should be 2" }
kono
parents:
diff changeset
4 program main
kono
parents:
diff changeset
5 real, dimension(2,3) :: a
kono
parents:
diff changeset
6 real, dimension(3) :: b
kono
parents:
diff changeset
7 real, dimension(:), allocatable :: ret
kono
parents:
diff changeset
8 allocate (ret(2))
kono
parents:
diff changeset
9 a = 1.0
kono
parents:
diff changeset
10 b = 2.3
kono
parents:
diff changeset
11 ret = matmul(a,b) ! This is OK
kono
parents:
diff changeset
12 deallocate(ret)
kono
parents:
diff changeset
13 allocate(ret(3))
kono
parents:
diff changeset
14 ret = matmul(a,b) ! This should throw an error.
kono
parents:
diff changeset
15 end program main
kono
parents:
diff changeset
16 ! { dg-output "Fortran runtime error: Incorrect extent in return array in MATMUL intrinsic: is 3, should be 2" }