[Ada] Enhance freezing code for instantiations
Pierre-Marie de Rodat
derodat@adacore.com
Thu Dec 2 16:28:53 GMT 2021
This makes it possible for the freezing code to let the back-end
establish a proper order of elaboration of package and subprogram
instantiations in more cases, in particular with circularities, by
placing freeze nodes for them later in the expanded code in these cases.
Tested on x86_64-pc-linux-gnu, committed on trunk
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 14956 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20211202/738122ec/attachment-0001.bin>
More information about the Gcc-patches
mailing list