Revert "* gimplify.c (gimplify_cond_expr): Don't check TREE_ADDRESSABLE."
authorJason Merrill <jason@redhat.com>
Fri, 24 May 2019 14:38:44 +0000 (10:38 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 24 May 2019 14:38:44 +0000 (10:38 -0400)
This reverts commit ac0f04360cc04e5b80a7d74f7edc47e395d2e744.

From-SVN: r271604

gcc/ChangeLog
gcc/gimplify.c

index d731bed21a39f7c116557133ded444321496dda8..6bc4d1a39963df1ff7f4e0666937eb5cfe383b7d 100644 (file)
@@ -1,3 +1,8 @@
+2019-05-24  Jason Merrill  <jason@redhat.com>
+
+       Revert:
+       * gimplify.c (gimplify_cond_expr): Don't check TREE_ADDRESSABLE.
+
 2019-05-24  Richard Biener  <rguenther@suse.de>
 
        PR testsuite/90607
index 8337b36c4115d3523f8cae66b572ee020de506c5..e5713dd4e8c146db7a222a41c6bdb0bd0d70aef3 100644 (file)
@@ -3990,12 +3990,10 @@ 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.  We cannot do that if the type is addressable, but
-        that should have been avoided before we got here.  */
+        temporary.  But we cannot do that if the type is addressable.  */
       if (((fallback & fb_rvalue) || !(fallback & fb_lvalue))
-         && (flag_checking || !TREE_ADDRESSABLE (type)))
+         && !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.  */