]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Crash on aggregate for tagged record with discriminants
authorJavier Miranda <miranda@adacore.com>
Mon, 3 Apr 2023 17:15:47 +0000 (17:15 +0000)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 29 May 2023 08:23:19 +0000 (10:23 +0200)
commit265c571daa41fdf4d21e06c55703f65ec9aad8c4
tree232540487c7c42ea2c2091697444e6992b24d9ea
parent204ecf39ca639cf77de1cc4a510a369fa2f91798
ada: Crash on aggregate for tagged record with discriminants

The frontend may crash processing an aggregate initializing
a derived tagged record type that has discriminants.

gcc/ada/

* sem_aggr.adb
(Resolve_Record_Aggregate): For aggregates of derived tagged
record types with discriminants, when collecting components
from ancestors, pass to subprogram Gather_Components the
parent type. Required to report errors on wrong aggregate
components.
gcc/ada/sem_aggr.adb