Skip to content

[flang] Missing diagnostic for non-definable actual to INTENT(INOUT) dummy #167555

@DanielCChen

Description

@DanielCChen

Consider the following code:

module m
    type base
        integer id
        contains

        procedure, pass :: assgn => assgnBase
    end type

    type (base) :: b1_m(10)
    contains

    elemental subroutine assgnBase (b, i)
        class (base), intent(inout) :: b
        integer, intent(in):: i
        b%id = i
    end subroutine

end module

program ftpbnd502a
use m

    type(base) :: b1(10)
    integer(4) :: aSect(3) = (/1,2,3/)

    call b1(aSect)%assgn (1) !<-- this is illegal
end

Flang is silent even with -pedantic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    flang:frontendquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions