summaryrefslogtreecommitdiff
path: root/gcc/tree-flow-inline.h
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-01-08 12:12:56 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-01-08 12:12:56 +0000
commitb5ea3701dbc58f601b70b18cb172ea579a8788ff (patch)
treeaf197648abcc06aeeac49b83039ca2f34009e9b9 /gcc/tree-flow-inline.h
parent97d399fccaed7aa25e7fa3842ae12bf22e2c7de2 (diff)
downloadgcc-b5ea3701dbc58f601b70b18cb172ea579a8788ff.tar.gz
2008-01-08 Richard Guenther <rguenther@suse.de>
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
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r--gcc/tree-flow-inline.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index 1074f680caa..1afbd1a8fc7 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.