This is the mail archive of the
mailing list for the GNU Fortran project.
Re: PR53818 - Allow -finit-local-zero with -fno-automatic for result variables
- From: Mikael Morin <mikael dot morin at sfr dot fr>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Tue, 03 Jul 2012 22:29:08 +0200
- Subject: Re: PR53818 - Allow -finit-local-zero with -fno-automatic for result variables
- References: <4FF1494A.email@example.com>
On 02.07.2012 09:10, Tobias Burnus wrote:
For some reasons, result variables are walked twice. With
-finit-local-zero their value gets set to 0, either via an inserted
assignment or by adding a initialization (sym->value).
With -fno-automatic sym->value is also set for result variables, which
later leads to an error. With the patch, that code path is skipped and
an assignment is done. (As the code path is taken twice, twp assignments
are done. I couldn't quickly see why the result variable is resolved
Build and regtested on x86-64-linux.
OK for the trunk?
OK. Maybe explain the reasons above in a comment?
Thanks for the patch