This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix variable set but not used warnings in Fortran FE
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Fri, 27 Nov 2009 15:54:42 -0800
- Subject: Re: [PATCH] Fix variable set but not used warnings in Fortran FE
- References: <20091127103645.GV22813@hs20-bc2-1.build.redhat.com>
On Fri, Nov 27, 2009 at 05:36:45AM -0500, Jakub Jelinek wrote:
>
> This patch fixes set but not used warnings in the Fortran FE.
> Most cases are quite obvious and the patch really doesn't (or at least
> should not) change gfortran behavior, though if somebody could look
> it over to see whether something else wasn't intended with the unused,
> just set variables, I'd appreciate it a lot.
After reading through the patch and the affected code, it
appears that you're simply doing janitor duty and cleaning
up accumulated junk. Thanks.
> BTW, I'm also unsure about that
> re = gfc_simplify_expr (e, 1);
> in get_array_index, shouldn't we report failure in that case if
> gfc_simplify_expr fails?
I think get_array_index is only called in situations where
gfc_simplify_expr cannot fail.
>
> Bootstrapped/regtested on x86_64-linux. Ok for trunk?
>
Yes.
--
steve