1! { dg-do compile }
2! { dg-options "-std=gnu" }
3
4! PR fortran/32095
5! PR fortran/34228
6! This program used to segfault, check this is fixed.
7! Also check that -std=gnu behaves as expected.
8
9SUBROUTINE test1 (n, arr)
10  IMPLICIT NONE
11
12  INTEGER :: arr(n) ! { dg-bogus "used before it is typed" }
13  INTEGER :: n
14  CHARACTER(len=LEN(a)) :: a ! { dg-error "used before it is typed" }
15END SUBROUTINE test1
16
17SUBROUTINE test2 ()
18  IMPLICIT NONE
19
20  DATA str/'abc'/ ! { dg-bogus "used before it is typed" }
21  CHARACTER(len=3) :: str
22END SUBROUTINE test2
23