diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2023-03-01 22:28:51 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-23 09:59:08 +0200 |
commit | 7131ee2788efe5dd5dc89790453877d29a2e7eb1 (patch) | |
tree | 75009a759df8053ef71aead550f32d5bbdc1713b /gcc/ada/sem_util.ads | |
parent | 4ca26401aa62e956d40bcd1cfa7c876ef789652e (diff) |
ada: Rework fix for internal error on quantified expression with predicated type
It turns out that skipping compiler-generated block scopes is problematic
when computing the public status of a subprogram, because this subprogram
may end up being nested in the elaboration procedure of a package spec or
body, in which case it may not be public.
This replaces the original fix with a pair of Push_Scope/Pop_Scope in the
Build_Predicate_Function procedure, as done elsewhere in similar cases.
gcc/ada/
* sem_ch13.adb (Build_Predicate_Functions): If the current scope
is not that of the type, push this scope and pop it at the end.
* sem_util.ads (Current_Scope_No_Loops_No_Blocks): Delete.
* sem_util.adb (Current_Scope_No_Loops_No_Blocks): Likewise.
(Set_Public_Status): Call again Current_Scope.
Diffstat (limited to 'gcc/ada/sem_util.ads')
-rw-r--r-- | gcc/ada/sem_util.ads | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 3edc158c749..253d1dadeee 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -642,9 +642,6 @@ package Sem_Util is function Current_Scope_No_Loops return Entity_Id; -- Return the current scope ignoring internally generated loops - function Current_Scope_No_Loops_No_Blocks return Entity_Id; - -- Return the current scope ignoring internally generated loops and blocks - procedure Add_Block_Identifier (N : Node_Id; Id : out Entity_Id; |