brintos

brintos / llvm-project-archived public Read only

0
0
Text · 766 B · ae15652 Raw
35 lines · plain
1!RUN: rm -rf %t && mkdir -p %t2!RUN: %flang -c -DWHICH=1 -J%t %s && FileCheck %s <%t/modfile79a.mod && %flang -c -fhermetic-module-files -DWHICH=2 -J%t %s && %flang -c -J%t %s && FileCheck %s <%t/modfile79a.mod3 4!Ensure that writing modfile79c.mod doesn't cause a spurious5!regeneration of modfile79a.mod from its copy in the hermetic6!module file modfile79b.mod.7!CHECK: !mod$ v1 sum:93ec75fe672c5b6c8!CHECK-NEXT: module modfile79a9 10#if WHICH == 111module modfile79a12  interface foo13    module procedure foo14  end interface15 contains16  subroutine foo17  end18end19#elif WHICH == 220module modfile79b21  use modfile79a22  interface bar23    procedure foo24  end interface25end26#else27module modfile79c28  use modfile79b29 contains30  subroutine test31    call bar32  end33end34#endif35