public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-5033] [Ada] Accessibility fix Date: Tue, 9 Nov 2021 09:46:56 +0000 (GMT) [thread overview] Message-ID: <20211109094656.5E9543858437@sourceware.org> (raw) 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
reply other threads:[~2021-11-09 9:46 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211109094656.5E9543858437@sourceware.org \ --to=pmderodat@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).