aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/inline.adb
diff options
context:
space:
mode:
authorRichard Kenner <kenner@adacore.com>2021-11-16 09:39:57 -0500
committerPierre-Marie de Rodat <derodat@adacore.com>2021-12-01 10:24:41 +0000
commitbe6bb3fc57e2af376e5c18eeca51119e87a55ee3 (patch)
tree1d50d1498e024a3413c26384480c616008d6afa7 /gcc/ada/inline.adb
parentdbdb6b93a2808d5c3d518e9675d058fab3b8f89b (diff)
downloadgcc-be6bb3fc57e2af376e5c18eeca51119e87a55ee3.zip
gcc-be6bb3fc57e2af376e5c18eeca51119e87a55ee3.tar.gz
gcc-be6bb3fc57e2af376e5c18eeca51119e87a55ee3.tar.bz2
[Ada] Fix issues with ignored ghost code and unnesting
gcc/ada/ * frontend.adb (Frontend): Do unnesting after ignored ghost code has been removed. * inline.adb (Analyze_Inlined_Bodies): Don't put ignored ghost entities on inlined subprogram list.
Diffstat (limited to 'gcc/ada/inline.adb')
-rw-r--r--gcc/ada/inline.adb11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index 08c454d..11a5523 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -1087,9 +1087,14 @@ package body Inline is
-- subprograms for the unit.
for Index in Inlined.First .. Inlined.Last loop
- if Is_Called (Inlined.Table (Index).Name) then
- Add_Inlined_Subprogram (Inlined.Table (Index).Name);
- end if;
+ declare
+ E : constant Subprogram_Kind_Id := Inlined.Table (Index).Name;
+
+ begin
+ if Is_Called (E) and then not Is_Ignored_Ghost_Entity (E) then
+ Add_Inlined_Subprogram (E);
+ end if;
+ end;
end loop;
Pop_Scope;