2 ! { dg-options "-std=legacy" }
3 ! We want to check for statement functions, thus legacy mode.
5 ! Check for errors with declarations not allowed within BLOCK.
12 INTENT(IN) :: a ! { dg-error "not allowed inside of BLOCK" }
13 VALUE :: a ! { dg-error "not allowed inside of BLOCK" }
14 OPTIONAL :: a ! { dg-error "not allowed inside of BLOCK" }
22 IMPLICIT INTEGER(a-z) ! { dg-error "not allowed inside of BLOCK" }
25 stfunc(a, b) = a + b ! { dg-error "not allowed inside of BLOCK" }
26 EQUIVALENCE (a, b) ! { dg-error "not allowed inside of BLOCK" }
27 NAMELIST /NLIST/ a, b ! { dg-error "not allowed inside of BLOCK" }
28 COMMON /CBLOCK/ c, d ! { dg-error "not allowed inside of BLOCK" }
29 ! This contains is in the specification part.
30 CONTAINS ! { dg-error "Unexpected CONTAINS statement" }
34 PRINT *, "Hello, world"
35 ! This one in the executable statement part.
36 CONTAINS ! { dg-error "Unexpected CONTAINS statement" }