ada: Crash on empty aggregate using the Ada 2022 notation
commitf7f8e290a11a2d1ab0eefa5a87d4d56f0146f9d4
authorJavier Miranda <miranda@adacore.com>
Sun, 12 Mar 2023 12:32:34 +0000 (12 12:32 +0000)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 25 May 2023 07:44:19 +0000 (25 09:44 +0200)
treec17991601bc9bf843a00aef1a9d5ca36d93c728d
parentf81245b46472746e03b1b86191969b822ed03943
ada: Crash on empty aggregate using the Ada 2022 notation

The compiler crashes processing an empty aggregate initializing
a component of a discriminated record type using the Ada 2022
notation (that is, []).

gcc/ada/

* exp_aggr.adb (Build_Record_Aggr_Code): Protect access to
aggregate components when the aggregate is empty.
gcc/ada/exp_aggr.adb