mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 16:37:06 +00:00

Enable the structure constructor with allocatable component support. Handling of `null()` for the allocatable component is added.
16 lines
332 B
Fortran
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
|
|
|