brintos

brintos / llvm-project-archived public Read only

0
0
Text · 477 B · e0911ef Raw
20 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! Ensure that an impure bound operator can't be called3! from a pure context.4module m5  type t6   contains7    procedure :: binding => func8    generic :: operator(.not.) => binding9  end type10 contains11  impure integer function func(x)12    class(t), intent(in) :: x13    func = 014  end15  pure integer function test16    !ERROR: Procedure 'func' referenced in pure subprogram 'test' must be pure too17    test = .not. t()18  end19end20