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-1617] [Ada] Do not clear Is_True_Constant flag on imported constants Date: Fri, 18 Jun 2021 08:38:09 +0000 (GMT) [thread overview] Message-ID: <20210618083809.A5822385040B@sourceware.org> (raw) https://gcc.gnu.org/g:2a8dbd6b244df31819c378626007c45f001f7136 commit r12-1617-g2a8dbd6b244df31819c378626007c45f001f7136 Author: Eric Botcazou <ebotcazou@adacore.com> Date: Tue Mar 16 10:24:39 2021 +0100 [Ada] Do not clear Is_True_Constant flag on imported constants gcc/ada/ * sem_prag.adb (Process_Import_Or_Interface): Do not artificially record a possible modification for a constant. Diff: --- gcc/ada/sem_prag.adb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 3e6af337dcd..4efb3fb9de3 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -9136,7 +9136,10 @@ package body Sem_Prag is Def_Id := Entity (Def_Id); Kill_Size_Check_Code (Def_Id); - Note_Possible_Modification (Get_Pragma_Arg (Arg1), Sure => False); + if Ekind (Def_Id) /= E_Constant then + Note_Possible_Modification + (Get_Pragma_Arg (Arg1), Sure => False); + end if; else Process_Convention (C, Def_Id); @@ -9146,7 +9149,10 @@ package body Sem_Prag is Mark_Ghost_Pragma (N, Def_Id); Kill_Size_Check_Code (Def_Id); - Note_Possible_Modification (Get_Pragma_Arg (Arg2), Sure => False); + if Ekind (Def_Id) /= E_Constant then + Note_Possible_Modification + (Get_Pragma_Arg (Arg2), Sure => False); + end if; end if; -- Various error checks
reply other threads:[~2021-06-18 8:38 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=20210618083809.A5822385040B@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).