| 1 |
C { dg-do run } |
| 2 |
C { dg-options "-fdump-tree-optimized -fcheck=bounds -fblas-matmul-limit=1 -O -fexternal-blas" } |
| 3 |
C { dg-shouldfail "Fortran runtime error: Incorrect extent in argument B in MATMUL intrinsic in dimension 1.*" } |
| 4 |
C { dg-additional-sources blas_gemm_routines.f } |
| 5 |
program main |
| 6 |
character(len=20) :: line |
| 7 |
integer :: n, m |
| 8 |
real, dimension(3,2) :: a |
| 9 |
real, dimension(:,:), allocatable :: b |
| 10 |
real, dimension(:,:), allocatable :: ret |
| 11 |
a = 1.0 |
| 12 |
line = '3 3' |
| 13 |
read (unit=line,fmt=*) n, m |
| 14 |
allocate (b(n,m)) |
| 15 |
b = 2.3 |
| 16 |
ret = matmul(a,b) ! This should throw an error. |
| 17 |
end |
| 18 |
! { dg-output "Fortran runtime error: Incorrect extent in argument B in MATMUL intrinsic in dimension 1.*" } |
| 19 |
! { dg-final { scan-tree-dump-times "_gfortran_matmul" 0 "optimized" } } |