AMDGPU: Allow f16/bf16 for DS_READ_TR16_B64 gfx950 builtins (#118297)
[llvm-project.git] / flang / test / Semantics / resolve103.f90
blob8f55968f43375f93663f403355224e90dd50ef99
1 ! RUN: not %flang_fc1 -pedantic %s 2>&1 | FileCheck %s
2 ! Test extension: allow forward references to dummy arguments or COMMON
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: warning: 'n1' was used without (or before) 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: warning: 'n2' was used without (or before) 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: warning: 'n3' was used without (or before) 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
30 !CHECK: warning: 'n4' was used without (or before) being explicitly typed
31 !CHECK: error: No explicit type declared for 'n4'
32 subroutine foo4(a)
33 implicit none
34 real a(n4)
35 common /b4/ n4
36 end
38 !CHECK: warning: 'n5' was used without (or before) being explicitly typed
39 subroutine foo5(a)
40 implicit none
41 real a(n5)
42 common /b5/ n5
43 !CHECK: error: The type of 'n5' has already been implicitly declared
44 double precision n5
45 end
47 !CHECK: warning: 'n6' was used without (or before) being explicitly typed
48 subroutine foo6(a)
49 implicit none
50 real a(n6)
51 common /b6/ n6
52 integer n6
53 end