51 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12module m13 integer :: x4 integer, private :: y5 interface operator(.foo.)6 module procedure ifoo7 end interface8 interface operator(-)9 module procedure ifoo10 end interface11 interface operator(.priv.)12 module procedure ifoo13 end interface14 interface operator(*)15 module procedure ifoo16 end interface17 private :: operator(.priv.), operator(*)18contains19 integer function ifoo(x, y)20 logical, intent(in) :: x, y21 end22end23 24use m1, local_x => x25!ERROR: 'y' is PRIVATE in 'm1'26use m1, local_y => y27!ERROR: 'z' not found in module 'm1'28use m1, local_z => z29use m1, operator(.localfoo.) => operator(.foo.)30!ERROR: 'OPERATOR(.bar.)' not found in module 'm1'31use m1, operator(.localbar.) => operator(.bar.)32 33!ERROR: 'y' is PRIVATE in 'm1'34use m1, only: y35!ERROR: 'OPERATOR(.priv.)' is PRIVATE in 'm1'36use m1, only: operator(.priv.)37!ERROR: 'OPERATOR(*)' is PRIVATE in 'm1'38use m1, only: operator(*)39!ERROR: 'z' not found in module 'm1'40use m1, only: z41!ERROR: 'z' not found in module 'm1'42use m1, only: my_x => z43use m1, only: operator(.foo.)44!ERROR: 'OPERATOR(.bar.)' not found in module 'm1'45use m1, only: operator(.bar.)46use m1, only: operator(-) , ifoo47!ERROR: 'OPERATOR(+)' not found in module 'm1'48use m1, only: operator(+)49 50end51