+2006-12-23 Jan Hubicka <jh@suse.cz>
+
+ * tree-flow-inline.h (var_ann): External variable annotations are
+ unshared too.
+ (tree_common_ann): Handle correctly unshared variables annotations.
+ * tree-dfa.c (create_var_ann): External variable annotations are
+ unshared too.
+
2006-12-22 Kazu Hirata <kazu@codesourcery.com>
* basic-block.h: Remove the prototype for
gcc_assert (DECL_P (t));
gcc_assert (!t->base.ann || t->base.ann->common.type == VAR_ANN);
- if (TREE_STATIC (t))
+ if (!MTAG_P (t) && (TREE_STATIC (t) || DECL_EXTERNAL (t)))
{
sann = GGC_CNEW (struct static_var_ann_d);
ann = &sann->ann;
ann->common.type = VAR_ANN;
- if (TREE_STATIC (t))
+ if (!MTAG_P (t) && (TREE_STATIC (t) || DECL_EXTERNAL (t)))
{
void **slot;
sann->uid = DECL_UID (t);
htab_remove_elt (DEFAULT_DEFS (cfun), *loc);
return;
}
- gcc_assert (TREE_CODE (def) == SSA_NAME);
+ gcc_assert (!def || TREE_CODE (def) == SSA_NAME);
loc = htab_find_slot_with_hash (DEFAULT_DEFS (cfun), &in,
DECL_UID (var), INSERT);
gcc_assert (t);
gcc_assert (DECL_P (t));
gcc_assert (TREE_CODE (t) != FUNCTION_DECL);
- if (TREE_STATIC (t))
+ if (!MTAG_P (t) && (TREE_STATIC (t) || DECL_EXTERNAL (t)))
{
struct static_var_ann_d *sann
= ((struct static_var_ann_d *)
static inline tree_ann_common_t
tree_common_ann (tree t)
{
+ /* Watch out static variables with unshared annotations. */
+ if (DECL_P (t) && TREE_CODE (t) == VAR_DECL)
+ return &var_ann (t)->common;
return &t->base.ann->common;
}