Skip to content

Conversation

akuhlens
Copy link
Contributor

@akuhlens akuhlens commented Oct 1, 2025

Fixes #155459 by making sure the cases are considered in the right order. Previously intrinsics types where overriding the pointer cases which have higher precedence in the specification.

Also passes the following tests.

Copy link

github-actions bot commented Oct 1, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

RT_API_ATTRS bool IsPointer() const {
return raw_.attribute == CFI_attribute_pointer;
}
RT_API_ATTRS bool IsAssociated() const { return raw_.base_addr != nullptr; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there already a predicate member function in Descriptor for a non-null base address?

// versions of this code that would probably execute faster.
// F'23 16.9.86 p 5
// If MOLD is unlimited polymorphic and is either a disassociated pointer or
// unallocated allocatable variable, the result is true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be simplified and corrected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[flang] Incorrect result of EXTENDS_TYPE_OF when MOLD is unlimited polymorphic disassociated pointer
2 participants