Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymorphic allocatables in results of pure functions #189

Closed
milancurcic opened this issue Sep 2, 2024 · 0 comments · Fixed by #190
Closed

Polymorphic allocatables in results of pure functions #189

milancurcic opened this issue Sep 2, 2024 · 0 comments · Fixed by #190
Labels
bug Something isn't working

Comments

@milancurcic
Copy link
Member

From j3-fortran.org/doc/year/24/24-007.pdf

C1594 The function result of a pure function shall not be both polymorphic and allocatable, or have a poly38 morphic allocatable ultimate component.

gfortran, ifort, and ifx have been fine with it, but apparently they're more tolerant of this (e.g. https://stackoverflow.com/questions/76653898/memory-leak-with-runtime-polymorphism).

Discovered by flang-new

@milancurcic milancurcic added the bug Something isn't working label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant