[Ada] Prevent copying uninitialized array with address clause
authorEd Schonberg <schonberg@adacore.com>
Sat, 29 Aug 2020 14:24:55 +0000 (10:24 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 23 Oct 2020 08:24:49 +0000 (04:24 -0400)
commitc875250d42d16abb1c638a1b340ea5dac5c9a479
tree935ec60d991ef7ede9d521f268864777f129e651
parent4d245fdaf742b468bce03034c47b82f51ce6282c
[Ada] Prevent copying uninitialized array with address clause

gcc/ada/

* freeze.adb (Is_Uninitialized_Aggregate): Recognize an array
aggregate with box initialization, scalar components, and no
component default values.
(Freeze_Entity, Check_Address_Clause): Call it, and simplify
freeze code for entity by removing useless assignment.
gcc/ada/freeze.adb