diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2022-04-20 09:54:49 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-05-30 08:29:01 +0000 |
commit | 3e93d2926aeefcffc978005b7964481f351dd494 (patch) | |
tree | cf09f68a5f04e970fda67498d91162d1c3aa09e6 /gcc/ada/freeze.ads | |
parent | 1ea22318caf52a98b32f8ef4e155376e7751db4b (diff) | |
download | gcc-3e93d2926aeefcffc978005b7964481f351dd494.zip gcc-3e93d2926aeefcffc978005b7964481f351dd494.tar.gz gcc-3e93d2926aeefcffc978005b7964481f351dd494.tar.bz2 |
[Ada] Do not freeze profiles for dispatch tables
When static dispatch tables are built for library-level tagged types, the
primitives (the subprogram themselves) are frozen; that's necessary because
their address is taken. However, their profile, i.e. all the types present
therein, is also frozen, which is not necessary after AI05-019 and is also
inconsistent with the handling of attribute references.
The change also removes a couple of pragma Inline on subprograms that are
too large for inlining to bring any benefit.
gcc/ada/
* exp_ch3.adb (Expand_N_Object_Declaration): Adjust call to Make_DT.
* exp_disp.ads (Building_Static_DT): Remove pragma Inline.
(Building_Static_Secondary_DT): Likewise.
(Convert_Tag_To_Interface): Likewise.
(Make_DT): Remove second parameter.
* exp_disp.adb (Make_DT): Likewise.
(Check_Premature_Freezing): Delete.
Pass Do_Freeze_Profile as False in call to Freeze_Entity.
* freeze.ads (Freezing_Library_Level_Tagged_Type): Delete.
* freeze.adb (Freeze_Profile): Remove obsolete code.
(Freeze_Entity): Tweak comment.
Diffstat (limited to 'gcc/ada/freeze.ads')
-rw-r--r-- | gcc/ada/freeze.ads | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/gcc/ada/freeze.ads b/gcc/ada/freeze.ads index 749fb79..bef4e14 100644 --- a/gcc/ada/freeze.ads +++ b/gcc/ada/freeze.ads @@ -120,12 +120,6 @@ package Freeze is -- where the freeze node is preallocated at the point of declaration, so -- that the First_Subtype_Link field can be set. - Freezing_Library_Level_Tagged_Type : Boolean := False; - -- Flag used to indicate that we are freezing the primitives of a library - -- level tagged type. Used to disable checks on premature freezing. - -- More documentation needed??? why is this flag needed? what are these - -- checks? why do they need disabling in some cases? - ----------------- -- Subprograms -- ----------------- |