1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror
2 ! Catch discrepancies between a local interface and a global definition
5 integer, intent(in
) :: x
8 subroutine global2(x
) bind(c
,name
="xyz")
9 integer, intent(in
) :: x
13 integer, intent(in
) :: x
16 pure
subroutine global4(x
)
17 integer, intent(in
) :: x
21 integer, intent(in
) :: x
24 ! Regression check: don't emit bogus "Implicit declaration of function 'global7' has a different result type than in previous declaration"
25 recursive function global6()
27 entry global7(n
) result(z
)
28 if (n
> 0) z
= global7(n
-1)
33 !WARNING: The global subprogram 'global1' is not compatible with its local procedure declaration (incompatible dummy argument #1: incompatible dummy data object types: INTEGER(4) vs REAL(4))
40 subroutine global3(x
) bind(c
,name
="abc")
43 subroutine global4(x
) ! not PURE, but that's ok
44 integer, intent(in
) :: x
46 !WARNING: The global subprogram 'global5' is not compatible with its local procedure declaration (incompatible procedure attributes: Pure)
47 pure
subroutine global5(x
)
48 integer, intent(in
) :: x
53 function global7(n
) result(z
)