public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1476] [Ada] Enable removal of side-effects in component declarations
@ 2021-06-15 10:22 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-06-15 10:22 UTC (permalink / raw)
  To: gcc-cvs

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-15 10:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 10:22 [gcc r12-1476] [Ada] Enable removal of side-effects in component declarations 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).