Skip to content

[flang] Missing diagnostic on invalid argument type for extends_type_of and same_type_as #162712

@DanielCChen

Description

@DanielCChen

Consider the following code

module m
    type SequenceBase
        sequence
        integer i
        integer j
    end type
end module

program typeDeclaration001d
use m
    class(*), pointer :: mold1 => null()
    type(SequenceBase) :: sb1

    if(extends_type_of(sb1, mold1)) ERROR STOP(1_4)   !! Should be diagnosed
    if(same_type_as(sb1, mold1)) ERROR STOP(2_4)      !! Should be diagnosed
end

A sequence derived type is not allowed in these two intrinsics.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions