Commit 7954dc21 by Andrew Pinski

re PR tree-optimization/30045 (ICE in nonnull_arg_p with the CHAIN decl)

2006-12-19  Andrew Pinski  <pinskia@gmail.com>

        PR tree-opt/30045
        * tree-vrp.c (nonnull_arg_p): Treat the static decl as always
        non null.

2006-12-19  Andrew Pinski  <pinskia@gmail.com>

        PR tree-opt/30045
        * gcc.dg/pr30045.c: New test

From-SVN: r120069
parent 69a0f8c6
2006-12-19 Andrew Pinski <pinskia@gmail.com>
PR tree-opt/30045
* tree-vrp.c (nonnull_arg_p): Treat the static decl as always
non null.
2006-12-20 Ben Elliston <bje@au.ibm.com>
* doc/invoke.texi (Optimize Options): Typo fix.
......@@ -18,8 +24,8 @@
2006-12-19 Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/29544
* gcc/Makefile.in (STAGE1_CHECKING): Rename to...
(STAGE1_CHECKING_CFLAGS): ... this.
* gcc/Makefile.in (STAGE1_CHECKING): Rename to...
(STAGE1_CHECKING_CFLAGS): ... this.
2006-12-18 Andrew Pinski <pinskia@gmail.com>
......
2006-12-19 Andrew Pinski <pinskia@gmail.com>
PR tree-opt/30045
* gcc.dg/pr30045.c: New test.
2006-12-20 Ben Elliston <bje@au.ibm.com>
* gcc.dg/20020312-2.c: Add a case for __SPU__.
/* { dg-do compile } */
/* { dg-options "-O2 -fno-inline" } */
int f(int *a)
{
int __attribute__((nonnull(1))) g(int *b)
{
int **c = &a;
if (b)
return *a + **c;
return *b;
}
if (a)
return g(a);
return 1;
}
......@@ -102,6 +102,10 @@ nonnull_arg_p (tree arg)
gcc_assert (TREE_CODE (arg) == PARM_DECL && POINTER_TYPE_P (TREE_TYPE (arg)));
/* The static chain decl is always non null. */
if (arg == cfun->static_chain_decl)
return true;
fntype = TREE_TYPE (current_function_decl);
attrs = lookup_attribute ("nonnull", TYPE_ATTRIBUTES (fntype));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment