Currently, the following is not handled: integer :: i(10) call foo(i(8)) ! has (8, 9, 10) -> Too short (3/4) contains subroutine foo(a) integer :: a(4) end subroutine
Longer test case, see TODO in gfortran.dg/argument_checking_5.f90. See PR30940 for the references to the standard, see also TODO in get_expr_storage_size of interface.c. The stuff is called "element sequence" and for an array element it consists of all storage units of the actual argument up to the end of the array. One should spend some thinking of using a character (len /= 1) array where one specifies a substring of an array element, but seemingly on can ignore the substring part then. I'm not aware of any compiler handling this yet and thus this is of lower importance. -- Summary: "Too short actual argument" for array element storage sequence Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32616