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, fortran] PR28660 - Spurious warning: 'ubound.6' is used uninitialized in this function


On Fri, Aug 11, 2006 at 09:53:46PM +0200, Paul Thomas wrote:
> OK for trunk and 4.2?
> 
> Paul
> 
> 2006-08-11  Paul Thomas  <pault@gcc.gnu.org>
> 
>    PR fortran/28660
>    * trans-decl.c (generate_expr_decls): New function.
>    (generate_dependency_declarations): New function.
>    (generate_local_decl): Call previous if not either a dummy or
>    a declaration in an entry master.
> 
> 2006-08-11  Paul Thomas  <pault@gcc.gnu.org>
> 
>    PR fortran/28660
>    * gfortran.dg/dependent_decls_1.f90: New test.

The testcase I can't judge, becasue you forgot to attach it ;-)

> *************** generate_local_decl (gfc_symbol * sym)
> *** 2760,2765 ****
> --- 2866,2879 ----
>   {
>     if (sym->attr.flavor == FL_VARIABLE)
>       {
> +       /* Check for dependencies in the array specification and needed have
> + 	 already been added to the function.  We mark the symbol now, as
> + 	 well as in traverse_ns, to prevent getting stuck in a circular
> + 	 dependency.  */

Perhaps I'm just tired, but I don't understand the first sentence of
this comment.

Other than that, the patch looks OK to me.


        Erik


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