Skip to content
Snippets Groups Projects
Commit c1691509 authored by Harald Anlauf's avatar Harald Anlauf
Browse files

Fortran: fix passing of zero-sized array arguments to procedures [PR86277]


gcc/fortran/ChangeLog:

	PR fortran/86277
	* trans-array.cc (gfc_trans_allocate_array_storage): When passing a
	zero-sized array with fixed (= non-dynamic) size, allocate temporary
	by the caller, not by the callee.

gcc/testsuite/ChangeLog:

	PR fortran/86277
	* gfortran.dg/zero_sized_14.f90: New test.
	* gfortran.dg/zero_sized_15.f90: New test.

Co-authored-by: default avatarMikael Morin <mikael@gcc.gnu.org>
parent b15d46e8
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment