[PATCH, PR 43347] Set TREE_NO_WARNING on replacements of artificial aggregates
Richard Guenther
rguenther@suse.de
Wed Mar 17 10:25:00 GMT 2010
On Tue, 16 Mar 2010, Martin Jambor wrote:
> Hi,
>
> the patch below makes the extra warnings go away. They are
> replacements of an artificial aggregate and thus we should not warn on
> them, despite the fact that the aggregate is not marked as
> TREE_NO_WARNING.
>
> Bootstrapped and regression tested on x86_64-linux. OK for trunk?
Ok.
Thanks,
Richard.
> Thanks,
>
> Martin
>
>
> 2010-03-16 Martin Jambor <mjambor@suse.cz>
>
> PR tree-optimization/43347
> * tree-sra.c (create_access_replacement): Set TREE_NO_WARNING when the
> original base is DECL_ARTIFICIAL or DECL_IGNORED_P.
>
> Index: mine/gcc/tree-sra.c
> ===================================================================
> --- mine.orig/gcc/tree-sra.c
> +++ mine/gcc/tree-sra.c
> @@ -1664,6 +1664,7 @@ create_access_replacement (struct access
>
> DECL_SOURCE_LOCATION (repl) = DECL_SOURCE_LOCATION (access->base);
> DECL_ARTIFICIAL (repl) = 1;
> + DECL_IGNORED_P (repl) = DECL_IGNORED_P (access->base);
>
> if (DECL_NAME (access->base)
> && !DECL_IGNORED_P (access->base)
> @@ -1676,11 +1677,10 @@ create_access_replacement (struct access
>
> SET_DECL_DEBUG_EXPR (repl, access->expr);
> DECL_DEBUG_EXPR_IS_FROM (repl) = 1;
> - DECL_IGNORED_P (repl) = 0;
> + TREE_NO_WARNING (repl) = TREE_NO_WARNING (access->base);
> }
> -
> - DECL_IGNORED_P (repl) = DECL_IGNORED_P (access->base);
> - TREE_NO_WARNING (repl) = TREE_NO_WARNING (access->base);
> + else
> + TREE_NO_WARNING (repl) = 1;
>
> if (dump_file)
> {
>
>
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex
More information about the Gcc-patches
mailing list