File tree Expand file tree Collapse file tree 6 files changed +20
-14
lines changed Expand file tree Collapse file tree 6 files changed +20
-14
lines changed Original file line number Diff line number Diff line change 1
- ! RUN: %flang_fc1 -fsyntax-only -fhermetic-module-files -DSTEP=1 %s
2
- ! RUN: %flang_fc1 -fsyntax-only -DSTEP=2 %s
3
- ! RUN: not %flang_fc1 -fsyntax-only -pedantic %s 2>&1 | FileCheck %s
1
+ ! RUN: rm -rf %t && mkdir -p %t
2
+ ! RUN: %flang_fc1 -fsyntax-only -fhermetic-module-files -DSTEP=1 -J%t %s
3
+ ! RUN: %flang_fc1 -fsyntax-only -DSTEP=2 -J%t %s
4
+ ! RUN: not %flang_fc1 -fsyntax-only -pedantic -J%t %s 2>&1 | FileCheck %s
4
5
5
6
! Tests that a module captured in a hermetic module file is compatible when
6
7
! USE'd with a module of the same name USE'd directly.
Original file line number Diff line number Diff line change 1
- ! RUN: %flang -c -fhermetic-module-files -DWHICH=1 %s && %flang -c -fhermetic-module-files -DWHICH=2 %s && %flang_fc1 -fdebug-unparse %s | FileCheck %s
1
+ ! RUN: rm -rf %t && mkdir -p %t
2
+ ! RUN: %flang -c -fhermetic-module-files -DWHICH=1 -J%t %s && %flang -c -fhermetic-module-files -DWHICH=2 -J%t %s && %flang_fc1 -fdebug-unparse -J%t %s | FileCheck %s
2
3
3
4
#if WHICH == 1
4
5
module modfile75a
Original file line number Diff line number Diff line change 1
- ! RUN: %flang_fc1 -fsyntax-only -fhermetic-module-files -DSTEP=1 %s
2
- ! RUN: %flang_fc1 -fsyntax-only %s
1
+ ! RUN: rm -rf %t && mkdir -p %t
2
+ ! RUN: %flang_fc1 -fsyntax-only -fhermetic-module-files -DSTEP=1 -J%t %s
3
+ ! RUN: %flang_fc1 -fsyntax-only -J%t %s
3
4
4
5
! Tests that a BIND(C) variable in a module A captured in a hermetic module
5
6
! file USE'd in a module B is not creating bogus complaints about BIND(C) name
6
7
! conflict when both module A and B are later accessed.
7
8
8
9
#if STEP == 1
9
- module modfile75a
10
+ module modfile76a
10
11
integer , bind(c) :: x
11
12
end
12
13
13
- module modfile75b
14
- use modfile75a ! capture hermetically
14
+ module modfile76b
15
+ use modfile76a ! capture hermetically
15
16
end
16
17
17
18
#else
18
19
subroutine test
19
- use modfile75a
20
- use modfile75b
20
+ use modfile76a
21
+ use modfile76b
21
22
implicit none
22
23
print * , x
23
24
end subroutine
Original file line number Diff line number Diff line change 1
- ! RUN: %flang -c -fhermetic-module-files -DWHICH=1 %s && %flang -c -fhermetic-module-files -DWHICH=2 %s && %flang -c -fhermetic-module-files %s && cat modfile77c.mod | FileCheck %s
1
+ ! RUN: rm -rf %t && mkdir -p %t
2
+ ! RUN: %flang -c -fhermetic-module-files -DWHICH=1 -J%t %s && %flang -c -fhermetic-module-files -DWHICH=2 -J%t %s && %flang -c -fhermetic-module-files -J%t %s && cat %t/modfile77c.mod | FileCheck %s
2
3
3
4
#if WHICH == 1
4
5
module modfile77a
Original file line number Diff line number Diff line change 1
- ! RUN: %flang -c -fhermetic-module-files -DWHICH=1 %s && %flang -c -fhermetic-module-files -DWHICH=2 %s && %flang -c -fhermetic-module-files %s && cat modfile78c.mod | FileCheck %s
1
+ ! RUN: rm -rf %t && mkdir -p %t
2
+ ! RUN: %flang -c -fhermetic-module-files -DWHICH=1 -J%t %s && %flang -c -fhermetic-module-files -DWHICH=2 -J%t %s && %flang -c -fhermetic-module-files -J%t %s && cat %t/modfile78c.mod | FileCheck %s
2
3
3
4
#if WHICH == 1
4
5
module modfile78a
Original file line number Diff line number Diff line change 1
- ! RUN: %flang -c -DWHICH=1 %s && FileCheck %s <modfile79a.mod && %flang -c -fhermetic-module-files -DWHICH=2 %s && %flang -c %s && FileCheck %s <modfile79a.mod
1
+ ! RUN: rm -rf %t && mkdir -p %t
2
+ ! RUN: %flang -c -DWHICH=1 -J%t %s && FileCheck %s <%t/modfile79a.mod && %flang -c -fhermetic-module-files -DWHICH=2 -J%t %s && %flang -c -J%t %s && FileCheck %s <%t/modfile79a.mod
2
3
3
4
! Ensure that writing modfile79c.mod doesn't cause a spurious
4
5
! regeneration of modfile79a.mod from its copy in the hermetic
You can’t perform that action at this time.
0 commit comments