Files
clang-p2996/flang/test/Semantics/structconst07.f90
Peter Klausler 27cf6ba1d7 [flang][runtime] Initialize uninitialized pointer components
Pointer components without default initialization pose some
difficult (or impossible) problems when they appear as right-hand
side targets in pointer assignment statements; they may contain
garbage or stale data that looks enough like a valid descriptor
to cause a crash.  Solve the problem by avoiding it -- ensure
that pointers' descriptors are at least minimally established.

Differential Revision: https://reviews.llvm.org/D149979
2023-05-08 15:08:37 -07:00

10 lines
187 B
Fortran

! RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s
type :: hasPointer
class(*), pointer :: sp
end type
type(hasPointer) hp
!CHECK: hp=haspointer(sp=NULL())
hp = hasPointer()
end