annotate gcc/testsuite/gfortran.dg/maxloc_bounds_7.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do run }
kono
parents:
diff changeset
2 ! { dg-options "-fbounds-check" }
kono
parents:
diff changeset
3 ! { dg-shouldfail "Incorrect extent in return value of MAXLOC intrinsic: is 3, should be 2" }
kono
parents:
diff changeset
4 module tst
kono
parents:
diff changeset
5 contains
kono
parents:
diff changeset
6 subroutine foo(res)
kono
parents:
diff changeset
7 integer(kind=4), allocatable :: f(:,:)
kono
parents:
diff changeset
8 integer, dimension(:) :: res
kono
parents:
diff changeset
9 allocate (f(2,5))
kono
parents:
diff changeset
10 f = 3
kono
parents:
diff changeset
11 res = maxloc(f,mask=.true.)
kono
parents:
diff changeset
12 end subroutine foo
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 end module tst
kono
parents:
diff changeset
15 program main
kono
parents:
diff changeset
16 use tst
kono
parents:
diff changeset
17 implicit none
kono
parents:
diff changeset
18 integer :: res(3)
kono
parents:
diff changeset
19 call foo(res)
kono
parents:
diff changeset
20 end program main
kono
parents:
diff changeset
21 ! { dg-output "Fortran runtime error: Incorrect extent in return value of MAXLOC intrinsic: is 3, should be 2" }