comparison gcc/testsuite/gfortran.dg/pr64107.f90 @ 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 ! { dg-do compile }
2 ! PR fortran/64107
3 ! Code contribute by fxcoudert at gcc dot gnu dot org
4 ! Appears to be fixed by patch for PR fortran/83633
5 module m1
6
7 contains
8 pure integer function foo()
9 foo = 2
10 end function
11 end module
12
13 subroutine test
14 use m1
15 integer :: x1(foo())
16 end subroutine
17
18 module m
19 use m1
20 integer :: x2(foo()) ! { dg-error "array with nonconstant bounds" }
21 contains
22 subroutine sub
23 integer :: x3(foo())
24 end subroutine
25 end module
26
27 program p
28 use m1
29 integer :: x4(foo()) ! { dg-error "array with nonconstant bounds" }
30 end program