diff options
author | Richard Biener <rguenther@suse.de> | 2015-03-20 12:39:32 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-03-20 12:39:32 +0000 |
commit | 3da3ff4e712aad4d79949ce2875e8748b799c95b (patch) | |
tree | 149b988f26d1e4b2d318e3c64d83f270f9e11aba /gcc/gimplify.c | |
parent | 1e039275b5781ba03565686eb723cb834919819a (diff) | |
download | gcc-3da3ff4e712aad4d79949ce2875e8748b799c95b.tar.gz |
re PR tree-optimization/64715 (__builtin_object_size (..., 1) fails to locate subobject)
2015-03-20 Richard Biener <rguenther@suse.de>
PR middle-end/64715
* tree-chrec.c (chrec_fold_poly_cst): Use useless_type_conversion_p
for type comparison and gcc_checking_assert.
(chrec_fold_plus_poly_poly): Likewise.
(chrec_fold_multiply_poly_poly): Likewise.
(chrec_convert_1): Likewise.
* gimplify.c (gimplify_expr): Remove premature folding of
&X + CST to &MEM[&X, CST].
* gcc.dg/pr15347.c: Use -O.
* c-c++-common/pr19807-1.c: Likewise.
From-SVN: r221532
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index d822913acce..ff0a225c92c 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -8524,23 +8524,6 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, post_p, is_gimple_val, fb_rvalue); recalculate_side_effects (*expr_p); ret = MIN (r0, r1); - /* Convert &X + CST to invariant &MEM[&X, CST]. Do this - after gimplifying operands - this is similar to how - it would be folding all gimplified stmts on creation - to have them canonicalized, which is what we eventually - should do anyway. */ - if (TREE_CODE (TREE_OPERAND (*expr_p, 1)) == INTEGER_CST - && is_gimple_min_invariant (TREE_OPERAND (*expr_p, 0))) - { - *expr_p = build_fold_addr_expr_with_type_loc - (input_location, - fold_build2 (MEM_REF, TREE_TYPE (TREE_TYPE (*expr_p)), - TREE_OPERAND (*expr_p, 0), - fold_convert (ptr_type_node, - TREE_OPERAND (*expr_p, 1))), - TREE_TYPE (*expr_p)); - ret = MIN (ret, GS_OK); - } break; } |