[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / matmul_bounds_7.f90
blob616869acf815739258e2b04567da06ee5c614825
1 ! { dg-do run }
2 ! { dg-additional-options "-fcheck=bounds" }
3 ! { dg-shouldfail "Fortran runtime error: dimension of array B incorrect in MATMUL intrinsic" }
5 program main
6 real, dimension(3,2) :: a
7 real, dimension(6) :: b
8 real, dimension(:), allocatable :: c
10 data a /-2., 3., -5., 7., -11., 13./
11 data b /17., -23., 29., -31., 37., -41./
13 c = matmul(pack(b,[b<20.]),a)
14 print *,sum(c)
16 end program main