URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [matmul_bounds_3.f90] - Rev 313
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do run }
! { dg-options "-fbounds-check" }
! { dg-shouldfail "Fortran runtime error: Incorrect extent in return array in MATMUL intrinsic for dimension 1: is 2, should be 3" }
program main
real, dimension(3,2) :: a
real, dimension(2,3) :: b
real, dimension(:,:), allocatable :: ret
allocate (ret(3,3))
a = 1.0
b = 2.3
ret = matmul(a,b) ! This is OK
deallocate(ret)
allocate(ret(2,3))
ret = matmul(a,b) ! This should throw an error.
end program main
! { dg-output "Fortran runtime error: Incorrect extent in return array in MATMUL intrinsic for dimension 1: is 2, should be 3" }
Go to most recent revision | Compare with Previous | Blame | View Log