* [Ada] Fix oversight in implementation of unnesting
@ 2022-09-12 8:19 Marc Poulhiès
0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2022-09-12 8:19 UTC (permalink / raw)
To: gcc-patches; +Cc: Eric Botcazou
[-- Attachment #1: Type: text/plain, Size: 286 bytes --]
The pass would traverse generic subprogram bodies, which are not expanded,
thus stumbling on unexpected nodes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_unst.adb (Unnest_Subprograms.Search_Subprograms): Skip the
subprogram bodies that are not to be unnested.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 390 bytes --]
diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb
--- a/gcc/ada/exp_unst.adb
+++ b/gcc/ada/exp_unst.adb
@@ -2592,6 +2592,8 @@ package body Exp_Unst is
and then Is_Library_Level_Entity (Spec_Id)
then
Unnest_Subprogram (Spec_Id, N);
+ else
+ return Skip;
end if;
end;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-12 8:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-12 8:19 [Ada] Fix oversight in implementation of unnesting Marc Poulhiès
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).