Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / modfile40.f90
blob0255c14e0a183ed495372d8ee6f6d1c3e96742b4
1 ! RUN: %python %S/test_modfile.py %s %flang_fc1
2 ! Ensure that intrinsics in module files retain their 'private' attribute,
3 ! if they are private.
5 module m1
6 intrinsic :: selected_real_kind
7 public :: selected_real_kind
8 end module
9 !Expect: m1.mod
10 !module m1
11 !intrinsic::selected_real_kind
12 !end
14 module m2
15 use m1, only: foo => selected_real_kind
16 real(foo(5,10)) :: x
17 end module
18 !Expect: m2.mod
19 !module m2
20 !use m1,only:foo=>selected_real_kind
21 !real(4)::x
22 !end
24 module m3
25 intrinsic :: selected_real_kind
26 private :: selected_real_kind
27 end module
28 !Expect: m3.mod
29 !module m3
30 !intrinsic::selected_real_kind
31 !private::selected_real_kind
32 !end
34 module m4
35 use m3
36 external :: selected_real_kind
37 end module
38 !Expect: m4.mod
39 !module m4
40 !procedure()::selected_real_kind
41 !end
43 module m5
44 private
45 intrinsic :: selected_real_kind
46 end module
47 !Expect: m5.mod
48 !module m5
49 !intrinsic::selected_real_kind
50 !private::selected_real_kind
51 !end
53 use m2
54 use m4
55 use m5
56 print *, kind(x)
57 end