Skip to content

[Flang] Missing diagnostic on duplicate defined I/O #128752

@DanielCChen

Description

@DanielCChen

Consider the following code:

module m
    type base
        integer id

        contains

        generic :: write (formatted) => write
        procedure, private :: write => writeb
    end type

    abstract interface
        subroutine absWrite (dtv, unit, iotype, v_list, iostat, iomsg)
        import
            class(base), intent(in) :: dtv
            integer, intent(in) :: unit
            character(*), intent(in) :: iotype
            integer, intent(in)  :: v_list(:)
            integer, intent(out) :: iostat
            character(*), intent(inout) :: iomsg
        end subroutine
    end interface

    procedure(absWrite) writeb, writebaseext

    interface write(formatted)
        procedure writebaseext
    end interface
end module

end

Both writeb and writebaseext have identical interface for the same defined I/O for type base. This should be diagnosed as duplicate.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions