This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix trunk profiledbootstrap in fortran FE


On Wed, Jun 10, 2009 at 05:26:06PM +0200, Jakub Jelinek wrote:
> Hi!
> 
> 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  <jakub@redhat.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
like

/* 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.

ok.

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]