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-1476] [Ada] Enable removal of side-effects in component declarations
Date: Tue, 15 Jun 2021 10:22:53 +0000 (GMT)	[thread overview]
Message-ID: <20210615102253.E82C1398B434@sourceware.org> (raw)

https://gcc.gnu.org/g:2a344c79824904d3903805ff2c2113af64af8b16

commit r12-1476-g2a344c79824904d3903805ff2c2113af64af8b16
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Tue Feb 16 14:58:46 2021 +0100

    [Ada] Enable removal of side-effects in component declarations
    
    gcc/ada/
    
            * exp_util.adb (Possible_Side_Effect_In_SPARK): Handle component
            declaration just like full type and subtype declarations.

Diff:
---
 gcc/ada/exp_util.adb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index 1189870bd60..78797f64165 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -11485,7 +11485,8 @@ package body Exp_Util is
          return not Inside_A_Generic
            and then Full_Analysis
            and then Nkind (Enclosing_Declaration (Exp)) in
-                      N_Full_Type_Declaration
+                      N_Component_Declaration
+                    | N_Full_Type_Declaration
                     | N_Iterator_Specification
                     | N_Loop_Parameter_Specification
                     | N_Object_Renaming_Declaration


                 reply	other threads:[~2021-06-15 10:22 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=20210615102253.E82C1398B434@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: link
Be 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).