gcc/fortran/:
[official-gcc.git] / gcc / testsuite / gfortran.dg / intent_out_3.f90
blob7346fd04668e1e66d9d30ca9e613b996b9ee56b5
1 ! { dg-do compile }
3 ! PR fortran/34662
4 ! The INTENT error was not detected.
5 ! Test case contributed by Joost VandeVondele.
7 MODULE M1
8 TYPE T1
9 INTEGER :: I(3)
10 END TYPE T1
11 TYPE(T1), PARAMETER :: D1=T1((/1,2,3/))
12 CONTAINS
13 SUBROUTINE S1(J)
14 INTEGER, INTENT(INOUT) :: J
15 END SUBROUTINE S1
16 END MODULE M1
17 USE M1
18 CALL S1(D1%I(3)) ! { dg-error "must be definable" }
19 END
20 ! { dg-final { cleanup-modules "m1" } }