2 ! { dg-options "-fdec-static" }
4 ! Check for conflicts between STATIC/AUTOMATIC and other attributes.
7 function s(a
, b
, x
, y
) result(z
)
9 integer, automatic, intent(IN
) :: a
! { dg-error "DUMMY attribute conflicts" }
10 integer, static, intent(IN
) :: b
! { dg-error "DUMMY attribute conflicts" }
11 integer, intent(OUT
) :: x
, y
12 automatic :: x
! { dg-error "DUMMY attribute conflicts" }
13 static :: y
! { dg-error "DUMMY attribute conflicts" }
15 automatic ! { dg-error "Expected entity-list in AUTOMATIC statement" }
16 automatic :: ! { dg-error "Expected entity-list in AUTOMATIC statement" }
17 static ! { dg-error "Expected entity-list in STATIC statement" }
18 static :: ! { dg-error "Expected entity-list in STATIC statement" }
20 integer, automatic :: auto1
, auto2
21 integer, static :: static1
, static2
22 integer :: auto3
, static3
26 common /c1
/ auto1
, auto2
! { dg-error "COMMON attribute conflicts" }
27 common /c2
/ static1
, static2
! { dg-error "COMMON attribute conflicts" }
28 common /c3
/ auto3
, static3
! { dg-error "COMMON attribute conflicts" }
30 integer, static :: z
! { dg-error "RESULT attribute conflicts" }
31 integer, automatic :: z
! { dg-error "RESULT attribute conflicts" }
32 static :: z
! { dg-error "RESULT attribute conflicts" }
33 automatic :: z
! { dg-error "RESULT attribute conflicts" }
35 integer, static, automatic :: o
! { dg-error "AUTOMATIC attribute conflicts" }
37 integer :: a
, b
, z
! fall-back decls so we don't get "no implicit type"