1! RUN: %python %S/test_errors.py %s %flang_fc1 2! Ensure that an impure bound operator can't be called 3! from a pure context. 4module m 5 type t 6 contains 7 procedure :: binding => func 8 generic :: operator(.not.) => binding 9 end type 10 contains 11 impure integer function func(x) 12 class(t), intent(in) :: x 13 func = 0 14 end 15 pure integer function test 16 !ERROR: Procedure 'func' referenced in pure subprogram 'test' must be pure too 17 test = .not. t() 18 end 19end 20