Skip to content

[flang] Incorrect result of EXTENDS_TYPE_OF when MOLD is unlimited polymorphic disassociated pointer #155459

@DanielCChen

Description

@DanielCChen

Consider the following code:

class(*), pointer :: ptr1 => null()
class(*), pointer :: ptr2 => null()
allocate(integer :: ptr1)
print*, extends_type_of(ptr1, ptr2)
end

Flang outputs F, but the expected outputs is T as the standard says about intrinsic EXTENDS_TYPE_OF

Result Value. If MOLD is unlimited polymorphic and is either a disassociated pointer or unallocated allocatable variable, the result is true;...

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions