[ORC] Merge ostream operators for SymbolStringPtrs into SymbolStringPool.h. NFC.
[llvm-project.git] / flang / test / Semantics / resolve14.f90
blobaae2145ff9cc503ee9b4c0c6a305566dc9497a0c
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 module m1
3 integer :: x
4 integer :: y
5 integer :: z
6 integer, parameter :: k1 = selected_int_kind(9)
7 end
8 module m2
9 real :: y
10 real :: z
11 real :: w
12 integer, parameter :: k2 = selected_int_kind(9)
13 end
15 subroutine p1
16 use m1
17 use m2
18 ! check that selected_int_kind is not use-associated
19 integer, parameter :: k = selected_int_kind(9)
20 end
22 program p2
23 use m1, xx => x, y => z
24 use m2
25 volatile w
26 !ERROR: Cannot change CONTIGUOUS attribute on use-associated 'w'
27 contiguous w
28 !ERROR: 'z' is use-associated from module 'm2' and cannot be re-declared
29 integer z
30 real, target :: a(10)
31 real, contiguous, pointer :: p(:) => a
32 !ERROR: Reference to 'y' is ambiguous
33 y = 1
34 contains
35 subroutine inner
36 p(1) = 0. ! ok - check for regression on contiguous host assoc.
37 end subroutine
38 end