https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105343

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
categorize_ctor_elements computes

(gdb) p num_nonzero_elements 
$3 = 1000
(gdb) p num_unique_nonzero_elements
$4 = 1000
(gdb) p num_ctor_elements
$5 = 1000
(gdb) p complete_p
$6 = false

so it fails to compute the required CTOR elements (num_ctor_elements lacks
the missing parts), falling into

        else if (!complete_p)
          /* If the constructor isn't complete, clear the whole object
             beforehand, unless CONSTRUCTOR_NO_CLEARING is set on it.

             ??? This ought not to be needed.  For any element not present
             in the initializer, we should simply set them to zero.  Except
             we'd need to *find* the elements that are not present, and that
             requires trickery to avoid quadratic compile-time behavior in
             large cases or excessive memory use in small cases.  */
          cleared = !CONSTRUCTOR_NO_CLEARING (ctor);

Reply via email to