[LLVM] Fix Maintainers.md formatting (NFC)
[llvm-project.git] / flang / test / Semantics / pure01.f90
blobe0911efd77c6034c3ca378beaf2fa7caaeac0f02
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.
4 module 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
19 end