From: Jason Merrill Date: Wed, 22 May 2019 22:00:14 +0000 (-0400) Subject: gimplify.c (gimplify_cond_expr): Don't check TREE_ADDRESSABLE. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5859a68d5f48605bda91d259c189d9d263f5589a;p=gcc.git gimplify.c (gimplify_cond_expr): Don't check TREE_ADDRESSABLE. * gimplify.c (gimplify_cond_expr): Don't check TREE_ADDRESSABLE. The front end shouldn't produce a GENERIC COND_EXPR of TREE_ADDRESSABLE type. From-SVN: r271524 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ee574683fc..dee55155ca5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2019-05-22 Jason Merrill + + * gimplify.c (gimplify_cond_expr): Don't check TREE_ADDRESSABLE. + 2019-05-22 H.J. Lu PR target/88483 diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 5bacb255ba7..6905165ad33 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -3990,10 +3990,12 @@ gimplify_cond_expr (tree *expr_p, gimple_seq *pre_p, fallback_t fallback) tree result; /* If either an rvalue is ok or we do not require an lvalue, create the - temporary. But we cannot do that if the type is addressable. */ + temporary. We cannot do that if the type is addressable, but + that should have been avoided before we got here. */ if (((fallback & fb_rvalue) || !(fallback & fb_lvalue)) - && !TREE_ADDRESSABLE (type)) + && (flag_checking || !TREE_ADDRESSABLE (type))) { + gcc_assert (!TREE_ADDRESSABLE (type)); if (gimplify_ctxp->allow_rhs_cond_expr /* If either branch has side effects or could trap, it can't be evaluated unconditionally. */