This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix trunk profiledbootstrap 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: Wed, 10 Jun 2009 08:45:24 -0700
- Subject: Re: [PATCH] Fix trunk profiledbootstrap in fortran FE
- References: <20090610152606.GX4822@tyan-ft48-01.lab.bos.redhat.com>
On Wed, Jun 10, 2009 at 05:26:06PM +0200, Jakub Jelinek wrote:
> The trunk currently fails to profiledbootstrap, due to 3 warnings in the
> fortran FE. When building with feedback, gfc_match_generic_spec resp.
> gfc_extract_int get inlined into their callers, but gcc isn't able to find
> out that op (which is initialized only if INTERFACE_INTRINSIC_OP) is only
> used if INTERFACE_INTIRNSIC_OP. This patch initializes the two variables
> to avoid the warnings. Also, calling a function in the FE fold_unary
> looks like a very bad idea, fold_unary is a middle-end function and e.g.
> in the debugger it can cause confusion.
> Ok for trunk?
> 2009-06-10 Jakub Jelinek <email@example.com>
> * interface.c (fold_unary): Rename to...
> (gfc_fold_unary): ... this.
> (gfc_extend_expr): Adjust caller.
By convention the Fortran FE normally uses the gfc_ prefix
on non-static functions. If the function is static, the
gfc_ is omitted. I don't recall the origins of this convention.
Can you add a small comment above gfc_fold_unary? Something
/* gfc_ prefix used to avoid possible conflicts with middle-end
fold_unary() function. */
Otherwise, the gfc_ may get removed during a code clean-up pass.
> (gfc_match_generic_spec): Likewise. Initialize *op to INTRINSIC_NONE
> to avoid warnings.
> * expr.c (gfc_replace_expr): Initialize *result to avoid warnings.