OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [maxloc_bounds_5.f90] - Blame information for rev 708

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-fbounds-check" }
3
! { dg-shouldfail "Incorrect extent in return value of MAXLOC intrinsic: is 3, should be 2" }
4
module tst
5
contains
6
  subroutine foo(res)
7
    integer(kind=4), allocatable :: f(:,:)
8
    integer, dimension(:) :: res
9
    allocate (f(2,5))
10
    f = 3
11
    res = maxloc(f,mask=f>2)
12
  end subroutine foo
13
 
14
end module tst
15
program main
16
  use tst
17
  implicit none
18
  integer :: res(3)
19
  call foo(res)
20
end program main
21
! { dg-output "Fortran runtime error: Incorrect extent in return value of MAXLOC intrinsic: is 3, should be 2" }
22
! { dg-final { cleanup-modules "tst" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.