From: Richard Biener Date: Wed, 4 Jun 2014 13:51:18 +0000 (+0000) Subject: tree.h (may_be_aliased): Trust TREE_ADDRESSABLE from TREE_PUBLIC and DECL_EXTERNAL... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=38af3208d5385b8b2601599479179888ce7f09a8;p=gcc.git tree.h (may_be_aliased): Trust TREE_ADDRESSABLE from TREE_PUBLIC and DECL_EXTERNAL decls. 2014-06-04 Richard Biener * tree.h (may_be_aliased): Trust TREE_ADDRESSABLE from TREE_PUBLIC and DECL_EXTERNAL decls. From-SVN: r211233 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e3b375a5570..8260626605b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-06-04 Richard Biener + + * tree.h (may_be_aliased): Trust TREE_ADDRESSABLE from + TREE_PUBLIC and DECL_EXTERNAL decls. + 2014-06-04 Matthew Fortune * regcprop.c (copyprop_hardreg_forward_1): Account for diff --git a/gcc/tree.h b/gcc/tree.h index 2637b55fa36..a3fb8669bf4 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4528,9 +4528,7 @@ static inline bool may_be_aliased (const_tree var) { return (TREE_CODE (var) != CONST_DECL - && (TREE_PUBLIC (var) - || DECL_EXTERNAL (var) - || TREE_ADDRESSABLE (var)) + && TREE_ADDRESSABLE (var) && !((TREE_STATIC (var) || TREE_PUBLIC (var) || DECL_EXTERNAL (var)) && ((TREE_READONLY (var) && !TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (var)))