blob: 3e0d8bdc6fb488df3b716e85c8d80e2b94c5546d [file] [edit]
! RUN: %python %S/test_errors.py %s %flang_fc1
function test_func(x) result(i)
integer, pointer :: i
real :: x
x = func()
contains
pure real function func()
!ERROR: Left-hand side of assignment is not definable
!BECAUSE: 'i' is externally visible via 'i' and not definable in a pure subprogram
i = 0
func = 0.
end function
end function