Peter Klausler 3ac00784ac
[flang] Fix crash on erroneous program (#123843)
Catch and report multiple initializations of the same procedure pointer
rather than assuming that control wouldn't reach a given point in name
resolution in that case.

Fixes https://github.com/llvm/llvm-project/issues/123538.
2025-01-27 08:55:56 -08:00

8 lines
275 B
Fortran

!RUN: %python %S/test_errors.py %s %flang_fc1
procedure(), pointer :: pp => tan
!ERROR: EXTERNAL attribute was already specified on 'pp'
!ERROR: POINTER attribute was already specified on 'pp'
!ERROR: 'pp' was previously initialized
procedure(real), pointer :: pp => tan
end