public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5033] [Ada] Accessibility fix
@ 2021-11-09 9:46 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-11-09 9:46 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:51e99ead9197fe4d6a8db8e9746e821abce76213
commit r12-5033-g51e99ead9197fe4d6a8db8e9746e821abce76213
Author: Ghjuvan Lacambre <lacambre@adacore.com>
Date: Wed Oct 27 13:26:38 2021 +0200
[Ada] Accessibility fix
gcc/ada/
* sem_util.adb (Accessibility_Level): Use init_proc_level_formal
instead of computing a new accessibility level from Scope_Depth
(E).
Diff:
---
gcc/ada/sem_util.adb | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index bc51a60ccf2..c8362f57b17 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -744,6 +744,13 @@ package body Sem_Util is
then
return Accessibility_Level (Related_Expression (E));
+ elsif Level = Dynamic_Level
+ and then Ekind (E) in E_In_Parameter | E_In_Out_Parameter
+ and then Present (Init_Proc_Level_Formal (Scope (E)))
+ then
+ return New_Occurrence_Of
+ (Init_Proc_Level_Formal (Scope (E)), Loc);
+
-- Normal object - get the level of the enclosing scope
else
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-09 9:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09 9:46 [gcc r12-5033] [Ada] Accessibility fix Pierre-Marie de Rodat
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).