Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / modfile43.f90
blobd2bf5e750ad121fa49438ff9a62d65f8cfc1b13a
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Test intrinsic vs non_intrinsic module coexistence
3 module iso_fortran_env
4 integer, parameter :: user_defined_123 = 123
5 end module
6 module m1
7 use, intrinsic :: iso_fortran_env, only: int32
8 !ERROR: Cannot USE,NON_INTRINSIC module 'iso_fortran_env' in the same scope as USE,INTRINSIC
9 use, non_intrinsic :: iso_fortran_env, only: user_defined_123
10 end module
11 module m2
12 use, intrinsic :: iso_fortran_env, only: int32
13 end module
14 module m3
15 use, non_intrinsic :: iso_fortran_env, only: user_defined_123
16 end module
17 module m4
18 use :: iso_fortran_env, only: user_defined_123
19 end module
20 module m5
21 !ERROR: Cannot read module file for module 'ieee_arithmetic': Source file 'ieee_arithmetic.mod' was not found
22 use, non_intrinsic :: ieee_arithmetic, only: ieee_selected_real_kind
23 end module
24 module notAnIntrinsicModule
25 end module
26 module m6
27 !ERROR: Cannot read module file for module 'notanintrinsicmodule': Source file 'notanintrinsicmodule.mod' was not found
28 use, intrinsic :: notAnIntrinsicModule
29 end module