This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PR fortran/85797, patch] - ICE in gfc_element_size, at fortran/target-memory.c:126
- From: Thomas Koenig <tkoenig at netcologne dot de>
- To: Harald Anlauf <anlauf at gmx dot de>, gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 20 Mar 2019 17:14:40 +0100
- Subject: Re: [PR fortran/85797, patch] - ICE in gfc_element_size, at fortran/target-memory.c:126
- References: <5C8EBB7F.90305@gmx.de>
Hi Harald,
My reading of the standard suggests that this is not allowed:
SOURCE shall be a scalar or array of any type.
MOLD shall be a scalar or array of any type. ...
I read the stanard differently. For comparison, look at UNPACK:
# VECTOR shall be a rank-one array of any type.
and a function result is fine there.
Also, looking at how the paragraph about MOLD continues:
# MOLD shall be a scalar or array of any type. If it is a variable, it
# need not be defined.
The sentence starting with "If" would be redundant if MOLD could
only be a variable.
However, I am ready to be convinced otherwise :-)
Regards
Thomas