38 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12module m13 !ERROR: Logical constant '.true.' may not be used as a defined operator4 interface operator(.TRUE.)5 end interface6 !ERROR: Logical constant '.false.' may not be used as a defined operator7 generic :: operator(.false.) => bar8end9 10module m211 interface operator(+)12 module procedure foo13 end interface14 interface operator(.foo.)15 module procedure foo16 end interface17 interface operator(.ge.)18 module procedure bar19 end interface20contains21 integer function foo(x, y)22 logical, intent(in) :: x, y23 foo = 024 end25 logical function bar(x, y)26 complex, intent(in) :: x, y27 bar = .false.28 end29end30 31!ERROR: Intrinsic operator '.le.' may not be used as a defined operator32use m2, only: operator(.le.) => operator(.ge.)33!ERROR: Intrinsic operator '.not.' may not be used as a defined operator34use m2, only: operator(.not.) => operator(.foo.)35!ERROR: Logical constant '.true.' may not be used as a defined operator36use m2, only: operator(.true.) => operator(.foo.)37end38