https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102086
Bug ID: 102086 Summary: [F2008][TS29113] Accepts invalid scalar TYPE(*) as actual argument to assumed-rank Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: accepts-invalid, diagnostic Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org CC: sandra at gcc dot gnu.org Target Milestone: --- C711 An assumed-type actual argument that corresponds to an assumed-rank dummy argument shall be assumed-shape or assumed-rank. That's invalid because assumed-shape and assumed-rank have an array descriptor with elem_len. However, a 'type(*)' variable by construction does not have an element length. Hence, the conversion does not work: contains subroutine foo(y) type(*) :: y(..) end subroutine bar(x) type(*) :: x(3,*) ! ok, but no array descriptor call foo(x) ! WRONG foo's is assumed-rank/needs an array descriptor end end