Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions flang/lib/Semantics/check-declarations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3622,6 +3622,7 @@ void CheckHelper::CheckDioDtvArg(const Symbol &proc, const Symbol &subp,
ioKind == common::DefinedIo::ReadUnformatted
? Attr::INTENT_INOUT
: Attr::INTENT_IN);
CheckDioDummyIsScalar(subp, *arg);
}
}

Expand Down Expand Up @@ -3687,6 +3688,7 @@ void CheckHelper::CheckDioAssumedLenCharacterArg(const Symbol &subp,
"Dummy argument '%s' of a defined input/output procedure must be assumed-length CHARACTER of default kind"_err_en_US,
arg->name());
}
CheckDioDummyIsScalar(subp, *arg);
}
}

Expand Down
21 changes: 21 additions & 0 deletions flang/test/Semantics/io11.f90
Original file line number Diff line number Diff line change
Expand Up @@ -809,3 +809,24 @@ subroutine wf(dtv, unit, iotype, v_list, iostat, iomsg)
end
end interface
end

module m30
type base
character(5), allocatable :: data
end type
interface write(formatted)
subroutine formattedRead (dtv, unit, iotype, v_list, iostat, iomsg)
import base
!ERROR: Dummy argument 'dtv' of a defined input/output procedure must be a scalar
class (base), intent(in) :: dtv(10)
integer, intent(in) :: unit
!ERROR: Dummy argument 'iotype' of a defined input/output procedure must be a scalar
character(*), intent(in) :: iotype(2)
integer, intent(in) :: v_list(:)
!ERROR: Dummy argument 'iostat' of a defined input/output procedure must be a scalar
integer, intent(out) :: iostat(*)
!ERROR: Dummy argument 'iomsg' of a defined input/output procedure must be a scalar
character(*), intent(inout) :: iomsg(:)
end subroutine
end interface
end module