PR middle-end/77674
[official-gcc.git] / gcc / testsuite / gfortran.dg / intent_out_3.f90
blob1afb504be06f062bb15933a82f9e8aaa5680f11a
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 "variable definition context" }
19 END