Skip to content

Flang crashes when calling procedure dummy argument #104798

@everythingfunctional

Description

@everythingfunctional

I've documented the issue in another repo, but the following example reproduces the issue.

module example_mod
    abstract interface
        subroutine sub_i
        end subroutine
    end interface
contains
    subroutine call_internal(string)
        character(len=*), intent(in) :: string
        call call_it(print_it)
    contains
        subroutine print_it
            print *, string
        end subroutine
    end subroutine
    subroutine call_it(sub)
        procedure(sub_i) :: sub
        call sub
    end subroutine
end module

program example_prog
    use example_mod
    call call_internal("Hello")
end program

Metadata

Metadata

Assignees

No one assigned

    Labels

    flangFlang issues not falling into any other categoryworksformeResolved as "works for me"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions