[to-be-committed] [RISC-V] Use Zbkb for general 64 bit constants when profitable
[official-gcc.git] / gcc / testsuite / gfortran.dg / dec_static_4.f90
blob91bed19fc4173ea27893f3417037e25026eb0b0e
1 ! { dg-do compile }
2 ! { dg-options "-fdec-static" }
4 ! Check for conflicts between STATIC/AUTOMATIC and other attributes.
7 function s(a, b, x, y) result(z)
8 implicit none
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
23 automatic :: auto3
24 static :: 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"
38 end