+2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gimplify.c (gimplify_init_constructor): Really never clear for an
+ incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
+
2018-06-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/86179
objects. Initializers for such objects must explicitly set
every field that needs to be set. */
cleared = false;
- else if (!complete_p && !CONSTRUCTOR_NO_CLEARING (ctor))
+ else if (!complete_p)
/* If the constructor isn't complete, clear the whole object
beforehand, unless CONSTRUCTOR_NO_CLEARING is set on it.
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 = true;
+ cleared = !CONSTRUCTOR_NO_CLEARING (ctor);
else if (num_ctor_elements - num_nonzero_elements
> CLEAR_RATIO (optimize_function_for_speed_p (cfun))
&& num_nonzero_elements < num_ctor_elements / 4)
+2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/aggr24.adb: New test.
+ * gnat.dg/aggr24_pkg.ad[sb]: New helper.
+
2018-06-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/86179