Remove assert in reshape_init_r.
authorMarek Polacek <polacek@redhat.com>
Mon, 30 Dec 2019 16:07:33 +0000 (16:07 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 30 Dec 2019 16:07:33 +0000 (16:07 +0000)
Asserting !BRACE_ENCLOSED_INITIALIZER_P seems pretty pointless, since
that checks for init_list_type_node, and a compound literal won't have
that type, nor will we see that type if we just checked that it's
something else.

* decl.c (reshape_init_r): Remove assert.

From-SVN: r279771

gcc/cp/ChangeLog
gcc/cp/decl.c

index 9c30253..a237a8f 100644 (file)
@@ -1,3 +1,7 @@
+2019-12-30  Marek Polacek  <polacek@redhat.com>
+
+       * decl.c (reshape_init_r): Remove assert.
+
 2019-12-30  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * decl2.c (delete_sanity): Add location_t parameter and use
index 2760dba..afe2aac 100644 (file)
@@ -6408,7 +6408,6 @@ reshape_init_r (tree type, reshape_iter *d, bool first_initializer_p,
          else if (same_type_ignoring_top_level_qualifiers_p (type, init_type))
            {
              ++d->cur;
-             gcc_assert (!BRACE_ENCLOSED_INITIALIZER_P (stripped_init));
              return init;
            }
          else