54 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 iterating over a set ordered by heap pointers. This issue was4! particularly noticeable when using Flang as a library.5 6! RUN: rm -rf %t && mkdir -p %t7! RUN: %flang_fc1 \8! RUN: -fsyntax-only \9! RUN: -J%t \10! RUN: %S/Inputs/modfile73-a.f90 \11! RUN: %S/Inputs/modfile73-b.f90 \12! RUN: %S/Inputs/modfile73-c.f9013! RUN: %flang_fc1 -fsyntax-only -J%t %s14! RUN: cat %t/modfile73.mod | FileCheck %s15 16! RUN: rm -rf %t && mkdir -p %t17! RUN: %flang_fc1 \18! RUN: -fsyntax-only \19! RUN: -J%t \20! RUN: %S/Inputs/modfile73-a.f90 \21! RUN: %S/Inputs/modfile73-b.f90 \22! RUN: %S/Inputs/modfile73-c.f90 \23! RUN: %s24! RUN: cat %t/modfile73.mod | FileCheck %s25 26 use modfile73ba27end 28module modfile7329 use modfile73bb30 use modfile73c 31 CONTAINS32 subroutine init_33 end 34 subroutine delete_35 end 36 subroutine assign_37 end 38 function initialized_ 39 end 40 function same_ 41 end 42 function refcount_ 43 end 44 function id_ 45 end 46 function name_ 47 end 48 subroutine tag_new_object49 end 50end51 52! CHECK: !need$ {{.*}} n modfile73bb53! CHECK-NEXT: !need$ {{.*}} n modfile73c54