aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-flow-inline.h
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2006-12-23 01:27:44 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2006-12-23 00:27:44 +0000
commit6ac5a24645e9f7793abc1f850d2a24a369a2e12b (patch)
tree6a329a1462ce5410f79cc96e19ef32901b223c94 /gcc/tree-flow-inline.h
parent007948dfcfa6b47b1c0e507d6050f0e386a97839 (diff)
downloadgcc-6ac5a24645e9f7793abc1f850d2a24a369a2e12b.zip
gcc-6ac5a24645e9f7793abc1f850d2a24a369a2e12b.tar.gz
gcc-6ac5a24645e9f7793abc1f850d2a24a369a2e12b.tar.bz2
tree-flow-inline.h (var_ann): External variable annotations are unshared too.
* 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. From-SVN: r120164
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r--gcc/tree-flow-inline.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index d87adc3..0695c65 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -203,7 +203,7 @@ var_ann (tree t)
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 *)
@@ -952,6 +952,9 @@ clear_call_clobbered (tree var)
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;
}