29 lines · plain
1! This test verifies that both invocations produce a consistent order in the2! generated `.mod` file. Previous versions of Flang exhibited non-deterministic3! behavior due to pointers outside the cooked source being used to order symbols4! in the `.mod` file.5 6! RUN: rm -rf %t && mkdir -p %t7! RUN: %flang_fc1 -fsyntax-only -J%t %S/Inputs/modfile72.f908! RUN: %flang_fc1 -fsyntax-only -J%t %s9! RUN: cat %t/bar.mod | FileCheck %s10 11! RUN: rm -rf %t && mkdir -p %t12! RUN: %flang_fc1 -fsyntax-only -J%t %S/Inputs/modfile72.f90 %s13! RUN: cat %t/bar.mod | FileCheck %s14 15module bar16 use foo, only : do_foo17 use foo, only : do_bar18contains19 subroutine do_baz()20 call do_foo()21 call do_bar()22 end23end24 25! CHECK: use foo,only:do_foo26! CHECK-NEXT: use foo,only:do_bar27! CHECK-NEXT: use foo,only:foo$foo$do_bar_impl=>do_bar_impl28! CHECK-NEXT: use foo,only:foo$foo$do_foo_impl=>do_foo_impl29