URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 302 |
Rev 384 |
! { dg-do run }
|
! { dg-do run }
|
! { dg-options "-fbounds-check" }
|
! { dg-options "-fbounds-check" }
|
! { dg-shouldfail "Incorrect extent in return value of MAXLOC intrinsic: is 3, should be 2" }
|
! { dg-shouldfail "Incorrect extent in return value of MAXLOC intrinsic: is 3, should be 2" }
|
module tst
|
module tst
|
contains
|
contains
|
subroutine foo(res)
|
subroutine foo(res)
|
integer(kind=4), allocatable :: f(:,:)
|
integer(kind=4), allocatable :: f(:,:)
|
integer, dimension(:) :: res
|
integer, dimension(:) :: res
|
allocate (f(2,5))
|
allocate (f(2,5))
|
f = 3
|
f = 3
|
res = maxloc(f,mask=.true.)
|
res = maxloc(f,mask=.true.)
|
end subroutine foo
|
end subroutine foo
|
|
|
end module tst
|
end module tst
|
program main
|
program main
|
use tst
|
use tst
|
implicit none
|
implicit none
|
integer :: res(3)
|
integer :: res(3)
|
call foo(res)
|
call foo(res)
|
end program main
|
end program main
|
! { dg-output "Fortran runtime error: Incorrect extent in return value of MAXLOC intrinsic: is 3, should be 2" }
|
! { dg-output "Fortran runtime error: Incorrect extent in return value of MAXLOC intrinsic: is 3, should be 2" }
|
! { dg-final { cleanup-modules "tst" } }
|
! { dg-final { cleanup-modules "tst" } }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.