[llvm][Docs] Update supported hardware (#121743)
[llvm-project.git] / flang / test / Semantics / declarations07.f90
blob8c95c163b043be75b5182c1705074e6f6d50e30a
1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror
2 ! A nasty case of a weird order of declarations - a symbol may appear
3 ! as an actual argument to a specification function before its rank
4 ! has been declared.
5 program main
6 interface kind
7 pure integer function mykind(x)
8 real, intent(in) :: x(:)
9 end
10 end interface
11 real a, b
12 integer, parameter :: ak = kind(a)
13 integer, parameter :: br = rank(b)
14 !WARNING: 'a' appeared earlier as a scalar actual argument to a specification function
15 dimension a(1)
16 !WARNING: 'b' appeared earlier as a scalar actual argument to a specification function
17 dimension b(1)
18 end