From b5ea3701dbc58f601b70b18cb172ea579a8788ff Mon Sep 17 00:00:00 2001 From: rguenth Date: Tue, 8 Jan 2008 12:12:56 +0000 Subject: [PATCH] 2008-01-08 Richard Guenther PR tree-optimization/34683 * tree-flow-inline.h (var_ann): Remove overzealous asserts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131393 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/tree-flow-inline.h | 23 ++++++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 86380ee..903656c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-01-08 Richard Guenther + + PR tree-optimization/34683 + * tree-flow-inline.h (var_ann): Remove overzealous asserts. + 2008-01-07 Jakub Jelinek PR target/34622 diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index 1074f68..1afbd1a 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -190,23 +190,28 @@ fill_referenced_var_vec (VEC (tree, heap) **vec) static inline var_ann_t var_ann (const_tree t) { - gcc_assert (t); - gcc_assert (DECL_P (t)); - gcc_assert (TREE_CODE (t) != FUNCTION_DECL); - if (!MTAG_P (t) && (TREE_STATIC (t) || DECL_EXTERNAL (t))) + var_ann_t ann; + + if (!MTAG_P (t) + && (TREE_STATIC (t) || DECL_EXTERNAL (t))) { struct static_var_ann_d *sann = ((struct static_var_ann_d *) htab_find_with_hash (gimple_var_anns (cfun), t, DECL_UID (t))); if (!sann) return NULL; - gcc_assert (sann->ann.common.type == VAR_ANN); - return &sann->ann; + ann = &sann->ann; } - gcc_assert (!t->base.ann - || t->base.ann->common.type == VAR_ANN); + else + { + if (!t->base.ann) + return NULL; + ann = (var_ann_t) t->base.ann; + } + + gcc_assert (ann->common.type == VAR_ANN); - return (var_ann_t) t->base.ann; + return ann; } /* Return the variable annotation for T, which must be a _DECL node. -- 2.7.4