[flang-commits] [flang] [flang] Safer hermetic module file reading (PR #121002)
via flang-commits
flang-commits at lists.llvm.org
Tue Jan 7 01:43:58 PST 2025
================
@@ -0,0 +1,79 @@
+!RUN: (%flang_fc1 -fsyntax-only -fhermetic-module-files -DSTEP=1 %s && %flang_fc1 -fsyntax-only -DSTEP=2 %s && pwd && ls -l *.mod && not %flang_fc1 -fsyntax-only -pedantic %s) 2>&1 | FileCheck %s
+
----------------
jeanPerier wrote:
Windows did not like the run command (from GitHub builbot log):
```
Command Output (stdout):
--
| --
| # RUN: at line 1
| (c:\ws\src\build\bin\flang.exe -fc1 -fsyntax-only -fhermetic-module-files -DSTEP=1 C:\ws\src\flang\test\Semantics\modfile71.F90 && c:\ws\src\build\bin\flang.exe -fc1 -fsyntax-only -DSTEP=2 C:\ws\src\flang\test\Semantics\modfile71.F90 && pwd && ls -l *.mod && not c:\ws\src\build\bin\flang.exe -fc1 -fsyntax-only -pedantic C:\ws\src\flang\test\Semantics\modfile71.F90) 2>&1 \| c:\ws\src\build\bin\filecheck.exe C:\ws\src\flang\test\Semantics\modfile71.F90
| # executed command: '(c:\ws\src\build\bin\flang.exe' -fc1 -fsyntax-only -fhermetic-module-files -DSTEP=1 'C:\ws\src\flang\test\Semantics\modfile71.F90'
| # .---command stderr------------
| # \| '(c:\\ws\\src\\build\\bin\\flang.exe': command not found
| # `-----------------------------
| # error: command failed with exit status: 127
```
What is the point of `&& pwd && ls -l *.mod` ?
I think you could split the line in three RUN lines since there is no piping :
```
!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
```
https://github.com/llvm/llvm-project/pull/121002
More information about the flang-commits
mailing list