[Bug fortran/69423] [6 Regression] Invalid optimization with deferred-length character
vehre at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 4 14:54:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69423
--- Comment #9 from vehre at gcc dot gnu.org ---
Created attachment 37579
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37579&action=edit
Clear explicit function result variables for deferred length char arrays
Well, using the explicit result declaration of comment #3 the code is far less
optimized. Furthermore are the .__result and __result parameters in the code of
comment #3 not cleared in tree-original.
When I add this clearing by modifying trans-decl.c (gfc_trans_deferred_vars (),
see attached patch1.txt), i.e.,
__.003t.original:
test (character(kind=1)[1:*.__result] * & __result, integer(kind=4) *
.__result, integer(kind=4) & restrict alen)
{
integer(kind=4) i;
*.__result = 0;
*__result = 0B;
...
then I get the same result, like in the original program. The question is, does
this information help us in any way?
More information about the Gcc-bugs
mailing list