[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / modfile01.f90
blob6316399477d03d8ab264bd7a9cdb56954b8793e2
1 ! RUN: %S/test_modfile.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 ! Check correct modfile generation for type with private component.
4 module m
5 integer :: i
6 integer, private :: j
7 type :: t
8 integer :: i
9 integer, private :: j
10 end type
11 type, private :: u
12 end type
13 type(t) :: x
14 end
16 !Expect: m.mod
17 !module m
18 !integer(4)::i
19 !integer(4),private::j
20 !type::t
21 !integer(4)::i
22 !integer(4),private::j
23 !end type
24 !type,private::u
25 !end type
26 !type(t)::x
27 !end
29 ! Check correct modfile generation for type with private module procedure.
31 module m2
32 private :: s1
33 contains
34 subroutine s1()
35 end
36 subroutine s2()
37 end
38 end
40 !Expect: m2.mod
41 !module m2
42 ! private::s1
43 !contains
44 ! subroutine s1()
45 ! end
46 ! subroutine s2()
47 ! end
48 !end
50 module m3
51 private
52 public :: f1
53 contains
54 real function f1()
55 end
56 real function f2()
57 end
58 end
60 !Expect: m3.mod
61 !module m3
62 ! private::f2
63 !contains
64 ! function f1()
65 ! real(4)::f1
66 ! end
67 ! function f2()
68 ! real(4)::f2
69 ! end
70 !end
72 ! Test optional dummy procedure
73 module m4
74 contains
75 subroutine s(f)
76 interface
77 logical recursive function f()
78 implicit none
79 end function
80 end interface
81 optional f
82 end
83 end
85 !Expect: m4.mod
86 !module m4
87 !contains
88 ! subroutine s(f)
89 ! optional::f
90 ! interface
91 ! recursive function f()
92 ! logical(4)::f
93 ! end
94 ! end interface
95 ! end
96 !end