brintos

brintos / llvm-project-archived public Read only

0
0
Text · 685 B · 75e5bcf Raw
19 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror2! A nasty case of a weird order of declarations - a symbol may appear3! as an actual argument to a specification function before its rank4! has been declared.5program main6  interface kind7    pure integer function mykind(x)8      real, intent(in) :: x(:)9    end10  end interface11  real a, b12  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 [-Wprevious-scalar-use]15  dimension a(1)16  !WARNING: 'b' appeared earlier as a scalar actual argument to a specification function [-Wprevious-scalar-use]17  dimension b(1)18end19