Skip to content

Polymorphic allocatables in results of pure functions #189

@milancurcic

Description

@milancurcic

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions