41 lines · plain
1 2#if STEP == 13! these modules must be read from module files4module generic_shadows_specific_m15 interface f ! reference must be to generic6 module procedure f ! must have same name as generic interface7 end interface8 contains9 character function f() ! must be character10 f = 'q'11 end12end13module generic_shadows_specific_m214 use generic_shadows_specific_m115end16module generic_shadows_specific_m317 use generic_shadows_specific_m2 ! must be generic_shadows_specific_m2, not generic_shadows_specific_m118 contains19 subroutine mustExist() ! not called, but must exist20 character x21 x = f()22 end23end24 25#else26! Check that expected code produced with no crash.27subroutine reproducer()28 use generic_shadows_specific_m229 use generic_shadows_specific_m330 character x31 x = f()32end33#endif34 35!RUN: rm -rf %t && mkdir -p %t36!RUN: %flang_fc1 -fsyntax-only -DSTEP=1 -J%t %s37!RUN: %flang_fc1 -emit-fir -J%t -o - %s | FileCheck %s38 39!CHECK-LABEL: func.func @_QPreproducer40!CHECK: fir.call @_QMgeneric_shadows_specific_m1Pf41