Debian Codegraph @

gcc/testsuite/gfortran.dg/matmul_bounds_13.f90

raw
1 ! { dg-do run }
2 ! { dg-options "-fcheck=bounds" }
3 ! { dg-shouldfail "Fortran runtime error: Incorrect extent in argument B in MATMUL intrinsic in dimension 1" }
4 program main
5 real, dimension(:,:), allocatable :: a, b, c
6 character(len=100) :: line
7 allocate (a(3,2))
8 allocate (b(2,4))
9 call random_number(a)
10 call random_number(b)
11 write (unit=line, fmt=*) matmul(a,transpose(b))
12 end program main
13 ! { dg-output "Fortran runtime error: Incorrect extent in argument B in MATMUL intrinsic in dimension 1" }