brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.1 KiB · ec65047 Raw
52 lines · plain
1! Checks that module search directories specified with `-J/-module-dir` and `-I` are handled correctly2 3!--------------------------4! FLANG DRIVER (flang)5!--------------------------6! RUN: %flang -fsyntax-only -I %S/Inputs -I %S/Inputs/module-dir %s  2>&1 | FileCheck %s --check-prefix=INCLUDED --allow-empty7! RUN: %flang -fsyntax-only -I %S/Inputs -J %S/Inputs/module-dir %s 2>&1 | FileCheck %s --check-prefix=INCLUDED --allow-empty8! RUN: %flang -fsyntax-only -I %S/Inputs -module-dir %S/Inputs/module-dir %s  2>&1 | FileCheck %s --check-prefix=INCLUDED --allow-empty9 10! RUN: not %flang -fsyntax-only -I %S/Inputs %s  2>&1 | FileCheck %s --check-prefix=MISSING_MOD211! RUN: not %flang -fsyntax-only -J %S/Inputs %s  2>&1 | FileCheck %s --check-prefix=MISSING_MOD212! RUN: not %flang -fsyntax-only -module-dir %S/Inputs %s  2>&1 | FileCheck %s --check-prefix=MISSING_MOD213 14! RUN: not %flang -fsyntax-only -I %S/Inputs/module-dir %s  2>&1 | FileCheck %s --check-prefix=SINGLEINCLUDE15! RUN: not %flang -fsyntax-only -J %S/Inputs/module-dir %s  2>&1 | FileCheck %s --check-prefix=SINGLEINCLUDE16! RUN: not %flang -fsyntax-only -module-dir %S/Inputs/module-dir %s  2>&1 | FileCheck %s --check-prefix=SINGLEINCLUDE17 18!-----------------------------------------19! FRONTEND FLANG DRIVER (flang -fc1)20!-----------------------------------------21! RUN: %flang_fc1 -fsyntax-only -I %S/Inputs -I %S/Inputs/module-dir %s  2>&1 | FileCheck %s --check-prefix=INCLUDED --allow-empty22! RUN: %flang_fc1 -fsyntax-only -I %S/Inputs -J %S/Inputs/module-dir %s 2>&1 | FileCheck %s --check-prefix=INCLUDED --allow-empty23! RUN: %flang_fc1 -fsyntax-only -I %S/Inputs -module-dir %S/Inputs/module-dir %s  2>&1 | FileCheck %s --check-prefix=INCLUDED --allow-empty24 25! RUN: not %flang_fc1 -fsyntax-only -I %S/Inputs %s  2>&1 | FileCheck %s --check-prefix=MISSING_MOD226! RUN: not %flang_fc1 -fsyntax-only -J %S/Inputs %s  2>&1 | FileCheck %s --check-prefix=MISSING_MOD227! RUN: not %flang_fc1 -fsyntax-only -module-dir %S/Inputs %s  2>&1 | FileCheck %s --check-prefix=MISSING_MOD228 29! RUN: not %flang_fc1 -fsyntax-only -I %S/Inputs/module-dir %s  2>&1 | FileCheck %s --check-prefix=SINGLEINCLUDE30! RUN: not %flang_fc1 -fsyntax-only -J %S/Inputs/module-dir %s  2>&1 | FileCheck %s --check-prefix=SINGLEINCLUDE31! RUN: not %flang_fc1 -fsyntax-only -module-dir %S/Inputs/module-dir %s  2>&1 | FileCheck %s --check-prefix=SINGLEINCLUDE32 33! INCLUDED-NOT: error34 35! MISSING_MOD2-NOT:error: Cannot parse module file for module 'basictestmoduleone''36! MISSING_MOD2-NOT:error: Derived type 't1' not found37! MISSING_MOD2:error: Cannot parse module file for module 'basictestmoduletwo'38! MISSING_MOD2:error: Derived type 't2' not found39 40! SINGLEINCLUDE-NOT:error: Cannot parse module file for module 'basictestmoduleone'41! SINGLEINCLUDE:error: Derived type 't1' not found42! SINGLEINCLUDE-NOT:error: Cannot parse module file for module 'basictestmoduletwo'43! SINGLEINCLUDE-NOT:error: Derived type 't2' not found44 45 46program test_search_dirs_for_mod_files47    USE basictestmoduleone48    USE basictestmoduletwo49    type(t1) :: x1 ! t1 defined in Inputs/basictestmoduleone.mod50    type(t2) :: x2 ! t2 defined in Inputs/module-dir/basictestmoduleone.mod51end52