[Ada] Further optimization with uninitialized aggregates
authorEd Schonberg <schonberg@adacore.com>
Sun, 18 Oct 2020 16:17:51 +0000 (12:17 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 25 Nov 2020 13:22:47 +0000 (08:22 -0500)
commita46fa6510d24f4edcfd13dace9f7a0b4d86b86be
treebccfce792ea3e01f9a5721010a8458e0ec741c4a
parent55fae09dcb8257c8f4be90198f675aafe4ed8f9c
[Ada] Further optimization with uninitialized aggregates

gcc/ada/

* freeze.adb (Is_Uninitialized_Aggregate): Move...
* exp_util.adb (Is_Uninitialized_Aggregate): ... here.
(Expand_Subtype_From_Expr): If the expression is an
uninitialized aggregate, capture subtype for declared object and
remove expression to suppress further superfluous expansion.
gcc/ada/exp_util.adb
gcc/ada/freeze.adb