From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id E82C1398B434; Tue, 15 Jun 2021 10:22:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E82C1398B434 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Pierre-Marie de Rodat To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1476] [Ada] Enable removal of side-effects in component declarations X-Act-Checkin: gcc X-Git-Author: Piotr Trojanek X-Git-Refname: refs/heads/master X-Git-Oldrev: 6ae60a649ee76755632adef16decdf90fb8c1ec8 X-Git-Newrev: 2a344c79824904d3903805ff2c2113af64af8b16 Message-Id: <20210615102253.E82C1398B434@sourceware.org> Date: Tue, 15 Jun 2021 10:22:53 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2021 10:22:54 -0000 https://gcc.gnu.org/g:2a344c79824904d3903805ff2c2113af64af8b16 commit r12-1476-g2a344c79824904d3903805ff2c2113af64af8b16 Author: Piotr Trojanek 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