24 lines · plain
1! Ensure argument -fintrinsic-modules-path works as expected.2! WITHOUT the option, the default location for the module is checked and no error generated.3! With the option GIVEN, the module with the same name is PREPENDED, and considered over the4! default one, causing a CHECKSUM error.5 6!-----------------------------------------7! FRONTEND FLANG DRIVER (flang -fc1)8!-----------------------------------------9! RUN: %flang_fc1 -fsyntax-only %s 2>&1 | FileCheck %s --allow-empty --check-prefix=WITHOUT10! RUN: not %flang_fc1 -fsyntax-only -fintrinsic-modules-path %S/Inputs/ %s 2>&1 | FileCheck %s --check-prefix=GIVEN11! RUN: not %flang_fc1 -fsyntax-only -fintrinsic-modules-path=%S/Inputs/ %s 2>&1 | FileCheck %s --check-prefix=GIVEN12 13! WITHOUT-NOT: 'ieee_arithmetic.mod' was not found14! WITHOUT-NOT: 'iso_fortran_env.mod' was not found15 16! GIVEN: error: Cannot use module file for module 'ieee_arithmetic': File has invalid checksum17! GIVEN: error: Cannot use module file for module 'iso_fortran_env': File has invalid checksum18 19 20program test_intrinsic_module_path21 use ieee_arithmetic, only: ieee_round_type22 use iso_fortran_env, only: team_type, event_type, lock_type23end program24