xref: /llvm-project/flang/test/Semantics/modfile63.f90 (revision 9629f2c4ca6a514abe27f537c1cb4af35ef0aa10)
1! RUN: %flang_fc1 -fsyntax-only -I%S/Inputs/dir1 %s
2! RUN: not %flang_fc1 -fsyntax-only -I%S/Inputs/dir2 -w %s 2>&1 | FileCheck --check-prefix=ERROR %s
3! RUN: %flang_fc1 -Werror -fsyntax-only -I%S/Inputs/dir1 -I%S/Inputs/dir2 %s
4
5! Inputs/dir1 and Inputs/dir2 each have identical copies of modfile63b.mod.
6! modfile63b.mod depends on Inputs/dir1/modfile63a.mod - the version in
7! Inputs/dir2/modfile63a.mod has a distinct checksum.
8
9! If it becomes necessary to recompile those modules, just use the
10! module files as Fortran source.
11
12use modfile63b
13call s2
14end
15
16! ERROR: Cannot use module file for module 'modfile63a': File is not the right module file for 'modfile63a':
17