comparison gcc/testsuite/gfortran.dg/matmul_bounds_14.f @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 C { dg-do run }
2 C { dg-options "-fno-realloc-lhs -fdump-tree-optimized -fcheck=bounds -fblas-matmul-limit=1 -O -fexternal-blas" }
3 C { dg-shouldfail "Fortran runtime error: Array bound mismatch for dimension 2 of array." }
4 C { dg-additional-sources blas_gemm_routines.f }
5
6 program main
7 real, dimension(3,2) :: a
8 real, dimension(2,3) :: b
9 real, dimension(:,:), allocatable :: ret
10 a = 1.0
11 b = 2.3
12 allocate(ret(3,2))
13 ret = matmul(a,b) ! This should throw an error.
14 end
15 ! { dg-output "Fortran runtime error: Array bound mismatch for dimension 2 of array.*" }
16 ! { dg-final { scan-tree-dump-times "_gfortran_matmul" 0 "optimized" } }