[PATCH] Preserve DECL_GIMPLE_REG_P flag in outof-ssa (PR tree-optimization/34618)
Richard Guenther
richard.guenther@gmail.com
Sat Jan 5 11:53:00 GMT 2008
On Jan 5, 2008 10:47 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> On this testcase we get a checking ICE in mudflap2 pass, because one of
> a PLUS_EXPR operands is not is_gimple_val. It has been created by outof-ssa
> create_temp from another VAR_DECL, is a vector var but doesn't have
> DECL_GIMPLE_REG_P on it.
>
> Fixed by preserving DECL_GIMPLE_REG_P in outof-ssa, bootstrapped/regtested
> on powerpc64-linux (and testcase also tested on x86_64-linux), ok for trunk?
Ok.
Thanks,
Richard.
> 2008-01-05 Jakub Jelinek <jakub@redhat.com>
>
> PR tree-optimization/34618
> * tree-outof-ssa.c (create_temp): Copy over DECL_GIMPLE_REG_P
> flag from T.
>
> * testsuite/libmudflap.c/pass62-frag.c: New test.
>
> --- gcc/tree-outof-ssa.c.jj 2007-11-01 22:20:44.000000000 +0100
> +++ gcc/tree-outof-ssa.c 2008-01-05 10:39:31.000000000 +0100
> @@ -1,5 +1,5 @@
> /* Convert a program in SSA form into Normal form.
> - Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
> + Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
> Contributed by Andrew Macleod <amacleod@redhat.com>
>
> This file is part of GCC.
> @@ -119,6 +119,7 @@ create_temp (tree t)
> }
> DECL_ARTIFICIAL (tmp) = DECL_ARTIFICIAL (t);
> DECL_IGNORED_P (tmp) = DECL_IGNORED_P (t);
> + DECL_GIMPLE_REG_P (tmp) = DECL_GIMPLE_REG_P (t);
> add_referenced_var (tmp);
>
> /* add_referenced_var will create the annotation and set up some
> --- libmudflap/testsuite/libmudflap.c/pass62-frag.c.jj 2008-01-04 23:46:24.000000000 +0100
> +++ libmudflap/testsuite/libmudflap.c/pass62-frag.c 2008-01-04 23:17:19.000000000 +0100
> @@ -0,0 +1,13 @@
> +/* PR tree-optimization/34618 */
> +/* { dg-do compile } */
> +/* { dg-options "-O3 -fmudflap" } */
> +
> +int a[16];
> +
> +void
> +foo ()
> +{
> + int i;
> + for (i = 0; i < 16; i++)
> + a[i] = i;
> +}
>
> Jakub
>
More information about the Gcc-patches
mailing list