Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / resolve103.f90
blobdbc3bca6cbc48bef752b134da58dffe4c8224ff1
1 ! RUN: not %flang_fc1 -pedantic %s 2>&1 | FileCheck %s
2 ! Test extension: allow forward references to dummy arguments
3 ! from specification expressions in scopes with IMPLICIT NONE(TYPE),
4 ! as long as those symbols are eventually typed later with the
5 ! same integer type they would have had without IMPLICIT NONE.
7 !CHECK: Dummy argument 'n1' was used without being explicitly typed
8 !CHECK: error: No explicit type declared for dummy argument 'n1'
9 subroutine foo1(a, n1)
10 implicit none
11 real a(n1)
12 end
14 !CHECK: Dummy argument 'n2' was used without being explicitly typed
15 subroutine foo2(a, n2)
16 implicit none
17 real a(n2)
18 !CHECK: error: The type of 'n2' has already been implicitly declared
19 double precision n2
20 end
22 !CHECK: Dummy argument 'n3' was used without being explicitly typed
23 !CHECK-NOT: error: Dummy argument 'n3'
24 subroutine foo3(a, n3)
25 implicit none
26 real a(n3)
27 integer n3
28 end