diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2022-08-31 14:39:08 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2022-09-12 10:16:51 +0200 |
commit | 46ba7ae3c6eea45cc03de5fb00c8084cdc760d64 (patch) | |
tree | 4c9ebff1326a5114cf327d479c6b42fc6c458c63 /gcc/ada | |
parent | 9bde1fc68f4ed9699814342987adf22fcb91eaee (diff) | |
download | gcc-46ba7ae3c6eea45cc03de5fb00c8084cdc760d64.zip gcc-46ba7ae3c6eea45cc03de5fb00c8084cdc760d64.tar.gz gcc-46ba7ae3c6eea45cc03de5fb00c8084cdc760d64.tar.bz2 |
[Ada] Fix oversight in implementation of unnesting
The pass would traverse generic subprogram bodies, which are not expanded,
thus stumbling on unexpected nodes.
gcc/ada/
* exp_unst.adb (Unnest_Subprograms.Search_Subprograms): Skip the
subprogram bodies that are not to be unnested.
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/exp_unst.adb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb index 1297f28..9164644 100644 --- 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; |