------- Comment #30 from rguenth at gcc dot gnu dot org 2008-01-08 12:30
-------
No, I didn't. But yes, overzealous asserts in the simple inline accessor
functions are probably counter-productive. For example things like
static inline bool
gimple_aliases_computed_p (const struct function *fun)
{
gcc_assert (fun && fun->gimple_df);
return fun->gimple_df->aliases_computed_p;
}
would segfault anyway if fun or fun->gimple_df would be NULL. Or
static inline function_ann_t
function_ann (const_tree t)
{
gcc_assert (t);
gcc_assert (TREE_CODE (t) == FUNCTION_DECL);
gcc_assert (!t->base.ann
|| t->base.ann->common.type == FUNCTION_ANN);
return (function_ann_t) t->base.ann;
}
multiple asserts generate multiple diagnostic calls. Now, both of these
functions are not in hot code-paths.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34683