diff options
author | Peter Bergner <bergner@vnet.ibm.com> | 2016-08-03 17:42:15 +0000 |
---|---|---|
committer | Peter Bergner <bergner@vnet.ibm.com> | 2016-08-03 17:42:15 +0000 |
commit | 3055bfa7109d64b711c72e2091646fa3caa999f2 (patch) | |
tree | e217aa2f523fcc0b9b1b82aa54e06cb20c33bb9b /gcc/tree-ssa.c | |
parent | 6dc26956185ac7fa84bf72036c4f9fc258078241 (diff) | |
parent | 9292dc98baf244da9c72b5c1c74ab87d961c381d (diff) |
Merge up to 239078.ibm/gcc-4_9-branch
Upstream FSF 4.9 release branch is now closed.
* REVISION: Update subversion id.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ibm/gcc-4_9-branch@239087 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 8ea1853fa89..3d3ffaa8982 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -1380,6 +1380,14 @@ non_rewritable_lvalue_p (tree lhs) tree decl = TREE_OPERAND (TREE_OPERAND (lhs, 0), 0); if (DECL_P (decl) && DECL_SIZE (decl) == TYPE_SIZE (TREE_TYPE (lhs)) + /* If the dynamic type of the decl has larger precision than + the decl itself we can't use the decls type for SSA rewriting. */ + && ((! INTEGRAL_TYPE_P (TREE_TYPE (decl)) + || compare_tree_int (DECL_SIZE (decl), + TYPE_PRECISION (TREE_TYPE (decl))) == 0) + || (INTEGRAL_TYPE_P (TREE_TYPE (lhs)) + && (TYPE_PRECISION (TREE_TYPE (decl)) + >= TYPE_PRECISION (TREE_TYPE (lhs))))) && (TREE_THIS_VOLATILE (decl) == TREE_THIS_VOLATILE (lhs))) return false; } |