------- Comment #6 from pault at gcc dot gnu dot org  2006-08-09 18:27 -------
(In reply to comment #5)
> It was caused by the openmp changes, but guess usually the parent routine
> at least touches the dummy argument and therefore it would be added to the
> right context.
> I was testing:
> --- trans-decl.c.jj     2006-08-09 15:39:36.000000000 +0200
> +++ trans-decl.c        2006-08-09 15:44:35.000000000 +0200
> @@ -884,7 +884,10 @@ gfc_get_symbol_decl (gfc_symbol * sym)
>           if (TREE_CODE (length) == VAR_DECL
>               && DECL_CONTEXT (length) == NULL_TREE)
>             {
> -             gfc_add_decl_to_function (length);
> +             if (sym->ns->proc_name->backend_decl == current_function_decl)
> +               gfc_add_decl_to_function (length);
> +             else
> +               gfc_add_decl_to_parent_function (length);
>               gfc_defer_symbol_init (sym);
>             }
>         }
> before I saw Paul's patch on gcc-patches, guess both versions will DTRT.
> 

Your call or mine, Jakub?  I suggest a tall glass of beer and arm wrestling for
the honours...

Paul


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28600

Reply via email to