[Ada] Enhance freezing code for instantiations
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 17 Nov 2021 13:19:45 +0000 (14:19 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 2 Dec 2021 16:26:26 +0000 (16:26 +0000)
commit8decef400095da6fcee12cb0bcd8cb4cc367e8fc
treec3dadbc356d9f494bef21f8f7d91c77b64e8a19c
parenteca89ac6e73026a8606e05e6f0486f963c02c4bc
[Ada] Enhance freezing code for instantiations

gcc/ada/

* sem_ch12.adb (Freeze_Package_Instance): Consistently consider
the freeze node of the parent and use large inequality for
Slocs.
(Freeze_Subprogram_Instance): Likewise.
(Insert_Freeze_Node_For_Instance): For an instance in a package
spec with no source body that immediately follows, consider the
body of the package for the placement of the freeze node and go
to the outer level if there is no such body.
gcc/ada/sem_ch12.adb