diff --git a/flang/test/Semantics/modfile71.F90 b/flang/test/Semantics/modfile71.F90 index 7c3c7f5b48958..7f32eb18c6f8f 100644 --- a/flang/test/Semantics/modfile71.F90 +++ b/flang/test/Semantics/modfile71.F90 @@ -1,6 +1,7 @@ -!RUN: %flang_fc1 -fsyntax-only -fhermetic-module-files -DSTEP=1 %s -!RUN: %flang_fc1 -fsyntax-only -DSTEP=2 %s -!RUN: not %flang_fc1 -fsyntax-only -pedantic %s 2>&1 | FileCheck %s +!RUN: rm -rf %t && mkdir -p %t +!RUN: %flang_fc1 -fsyntax-only -fhermetic-module-files -DSTEP=1 -J%t %s +!RUN: %flang_fc1 -fsyntax-only -DSTEP=2 -J%t %s +!RUN: not %flang_fc1 -fsyntax-only -pedantic -J%t %s 2>&1 | FileCheck %s ! Tests that a module captured in a hermetic module file is compatible when ! USE'd with a module of the same name USE'd directly. diff --git a/flang/test/Semantics/modfile75.F90 b/flang/test/Semantics/modfile75.F90 index aba00ffac848a..8f7adafe7204d 100644 --- a/flang/test/Semantics/modfile75.F90 +++ b/flang/test/Semantics/modfile75.F90 @@ -1,4 +1,5 @@ -!RUN: %flang -c -fhermetic-module-files -DWHICH=1 %s && %flang -c -fhermetic-module-files -DWHICH=2 %s && %flang_fc1 -fdebug-unparse %s | FileCheck %s +!RUN: rm -rf %t && mkdir -p %t +!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 #if WHICH == 1 module modfile75a diff --git a/flang/test/Semantics/modfile76.F90 b/flang/test/Semantics/modfile76.F90 index 50ee9a088e119..c7ae91bd42bed 100644 --- a/flang/test/Semantics/modfile76.F90 +++ b/flang/test/Semantics/modfile76.F90 @@ -1,23 +1,24 @@ -!RUN: %flang_fc1 -fsyntax-only -fhermetic-module-files -DSTEP=1 %s -!RUN: %flang_fc1 -fsyntax-only %s +!RUN: rm -rf %t && mkdir -p %t +!RUN: %flang_fc1 -fsyntax-only -fhermetic-module-files -DSTEP=1 -J%t %s +!RUN: %flang_fc1 -fsyntax-only -J%t %s ! Tests that a BIND(C) variable in a module A captured in a hermetic module ! file USE'd in a module B is not creating bogus complaints about BIND(C) name ! conflict when both module A and B are later accessed. #if STEP == 1 -module modfile75a +module modfile76a integer, bind(c) :: x end -module modfile75b - use modfile75a ! capture hermetically +module modfile76b + use modfile76a ! capture hermetically end #else subroutine test - use modfile75a - use modfile75b + use modfile76a + use modfile76b implicit none print *, x end subroutine diff --git a/flang/test/Semantics/modfile77.F90 b/flang/test/Semantics/modfile77.F90 index a82904ebbcc22..9ad615c16c43c 100644 --- a/flang/test/Semantics/modfile77.F90 +++ b/flang/test/Semantics/modfile77.F90 @@ -1,4 +1,5 @@ -!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 +!RUN: rm -rf %t && mkdir -p %t +!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 #if WHICH == 1 module modfile77a diff --git a/flang/test/Semantics/modfile78.F90 b/flang/test/Semantics/modfile78.F90 index cb3eccd9a4108..19b9ac39de934 100644 --- a/flang/test/Semantics/modfile78.F90 +++ b/flang/test/Semantics/modfile78.F90 @@ -1,4 +1,5 @@ -!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 +!RUN: rm -rf %t && mkdir -p %t +!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 #if WHICH == 1 module modfile78a diff --git a/flang/test/Semantics/modfile79.F90 b/flang/test/Semantics/modfile79.F90 index 7d3b42166654e..ae156527b3bf3 100644 --- a/flang/test/Semantics/modfile79.F90 +++ b/flang/test/Semantics/modfile79.F90 @@ -1,4 +1,5 @@ -!RUN: %flang -c -DWHICH=1 %s && FileCheck %s