ada: Corrections to premature-references rules
commitce081284bde18cf554ac7c10166581c8c667a6b7
authorBob Duff <duff@adacore.com>
Wed, 29 Mar 2023 17:57:35 +0000 (29 13:57 -0400)
committerMarc Poulhiès <poulhies@adacore.com>
Fri, 26 May 2023 07:29:20 +0000 (26 09:29 +0200)
tree73d1e6592abae6dd89e6300acab3f6b93285b5a6
parent19668be0f8673a3545b0ad823fe1dd459f2f6772
ada: Corrections to premature-references rules

This patch corrects the implementation of RM-8.3(17),
which says that a record extension is self-hidden until "record".
Previously, such premature references could cause a compiler crash.

gcc/ada/

* sem_ch3.adb
(Build_Derived_Record_Type): Temporarily set the state of the
Derived_Type to "self-hidden" while processing constraints
and discriminants of a record extension.
gcc/ada/sem_ch3.adb