[LLVM] Fix Maintainers.md formatting (NFC)
[llvm-project.git] / flang / test / Driver / write-module.f90
blobc4dbaddd4b270844ca96cf0b4cff79d6363bfcf6
1 ! Checks that the module file:
2 ! * is _saved_
3 ! * is saved in the _directory specified by the user_
4 ! We use `-fsyntax-only` as it stops after the semantic checks (the module file is generated when sema checks are run)
6 !--------------------------
7 ! -module-dir <value>
8 !--------------------------
9 ! RUN: rm -rf %t && mkdir -p %t/dir-flang
10 ! RUN: cd %t && %flang -fsyntax-only -module-dir %t/dir-flang %s
11 ! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
12 ! RUN: cd -
14 !--------------------------
15 ! -module-dir<value>
16 !--------------------------
17 ! RUN: rm -rf %t && mkdir -p %t/dir-flang
18 ! RUN: cd %t && %flang -fsyntax-only -module-dir%t/dir-flang %s
19 ! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
20 ! RUN: cd -
22 !---------------------------
23 ! -J <value>
24 !---------------------------
25 ! RUN: rm -rf %t && mkdir -p %t/dir-flang
26 ! RUN: cd %t && %flang -fsyntax-only -J %t/dir-flang %s
27 ! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
28 ! RUN: cd -
30 !------------------------------
31 ! -J<value>
32 !------------------------------
33 ! RUN: rm -rf %t && mkdir -p %t/dir-flang
34 ! RUN: cd %t && %flang -fsyntax-only -J%t/dir-flang %s
35 ! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
36 ! RUN: cd -
38 module testmodule
39 type::t2
40 end type
41 end