AVR: tree-optimization/115307 - Work around isinf bloat from early passes.
[official-gcc.git] / gcc / testsuite / gfortran.dg / interface_28.f90
blobc8272270836730fc94a202e082c13d7253d507e7
1 ! { dg-do compile }
3 ! PR 36947: Attributes not fully checked comparing actual vs dummy procedure
5 ! Original test case by Walter Spector <w6ws@earthlink.net>
6 ! Modified by Janus Weil <janus@gcc.gnu.org>
8 module testsub
9 contains
10 subroutine test(sub)
11 interface
12 subroutine sub(x)
13 integer, intent(in), optional:: x
14 end subroutine
15 end interface
16 call sub()
17 end subroutine
18 end module
20 module sub
21 contains
22 subroutine subActual(x)
23 ! actual subroutine's argment is different in intent
24 integer, intent(inout),optional:: x
25 end subroutine
26 subroutine subActual2(x)
27 ! actual subroutine's argment is missing OPTIONAL
28 integer, intent(in):: x
29 end subroutine
30 end module
32 program interfaceCheck
33 use testsub
34 use sub
36 integer :: a
38 call test(subActual) ! { dg-error "INTENT mismatch in argument" }
39 call test(subActual2) ! { dg-error "OPTIONAL mismatch in argument" }
40 end program