xref: /llvm-project/flang/test/Semantics/data16.f90 (revision a9782fead3205fbcd8512acc057820e4235d8131)
1! RUN: %python %S/test_errors.py %s %flang_fc1
2program main
3 contains
4  subroutine subr
5    data foo/6.66/ ! implicit declaration of "foo": ok
6    integer m
7    !ERROR: Implicitly typed local entity 'n' not allowed in specification expression
8    real a(n)
9    !ERROR: Host-associated object 'n' must not be initialized in a DATA statement
10    data n/123/
11    block
12      real b(m)
13      !ERROR: Host-associated object 'm' must not be initialized in a DATA statement
14      data m/10/
15    end block
16  end subroutine
17end program
18