llvm-project/flang/test/Semantics/structconst07.f90
Kelvin Li 3d3c63da6b
[flang] Add structure constructor with allocatable component (#77845)
Enable the structure constructor with allocatable component support. 
Handling of `null()` for the allocatable component is added.
2024-01-17 11:24:05 -05:00

16 lines
332 B
Fortran

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