Files
clang-p2996/flang/test/Semantics/data23.f90
Peter Klausler 28c427e5c0 [flang] Ensure that DATA converter can cope with proc ptr error (#90973)
Multiple definitions of a procedure pointer with DATA statements should
elicit an error message, not a compiler crash.

Fixes https://github.com/llvm/llvm-project/issues/90944.
2024-05-09 09:44:07 -07:00

19 lines
417 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
program p
interface
subroutine s
end subroutine
end interface
!ERROR: DATA statement initializations affect 'p' more than once
procedure(s), pointer :: p
type t
procedure(s), pointer, nopass :: p
end type
!ERROR: DATA statement initializations affect 'x%p' more than once
type(t) x
data p /s/
data p /s/
data x%p /s/
data x%p /s/
end