Debian Codegraph @

gcc/testsuite/gfortran.dg/matmul_bounds_11.f90

raw
1 ! { dg-do run }
2 ! { dg-options "-O -finline-matmul-limit=30 -fcheck=all" }
3 ! { dg-shouldfail "Dimension of array B incorrect in MATMUL intrinsic" }
4 program main
5 real, dimension(:,:), allocatable :: a
6 real, dimension(:), allocatable :: b
7 real, dimension(:), allocatable :: res
8 allocate (a(2,2), b(3))
9 call random_number(a)
10 call random_number(b)
11 res = matmul(a,b)
12 print *,res
13 end program main
14 ! { dg-output "Fortran runtime error: Incorrect extent in argument B in MATMUL intrinsic in dimension 1: is 3, should be 2" }
15