aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2016-05-11 10:24:11 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2016-05-11 10:24:11 +0000
commitebc1b29edb3428dd18e76cba8626625bfb184f1d (patch)
treec56af27e777a33142ec5005ae7600ac16297fad4 /gcc/gimplify.c
parent98ccd1d7ab1d9a0c99cce0d1c05ddcda3659dd26 (diff)
downloadgcc-ebc1b29edb3428dd18e76cba8626625bfb184f1d.zip
gcc-ebc1b29edb3428dd18e76cba8626625bfb184f1d.tar.gz
gcc-ebc1b29edb3428dd18e76cba8626625bfb184f1d.tar.bz2
re PR middle-end/71002 (-fstrict-aliasing breaks Boost's short string optimization implementation)
2016-05-11 Richard Biener <rguenther@suse.de> PR middle-end/71002 * alias.c (reference_alias_ptr_type): Preserve alias-set zero if the langhook insists on it. * fold-const.c (make_bit_field_ref): Add arg for the original reference and preserve its alias-set. (decode_field_reference): Take exp by reference and adjust it to the original memory reference. (optimize_bit_field_compare): Adjust callers. (fold_truth_andor_1): Likewise. * gimplify.c (gimplify_expr): Adjust in-SSA form test. * g++.dg/torture/pr71002.C: New testcase. From-SVN: r236117
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index f13980d..c433a84 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -10452,7 +10452,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
in suitable form. Re-gimplifying would mark the address
operand addressable. Always gimplify when not in SSA form
as we still may have to gimplify decls with value-exprs. */
- if (!gimplify_ctxp || !gimplify_ctxp->into_ssa
+ if (!gimplify_ctxp || !gimple_in_ssa_p (cfun)
|| !is_gimple_mem_ref_addr (TREE_OPERAND (*expr_p, 0)))
{
ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p,