From: Piotr Trojanek Date: Tue, 16 Feb 2021 13:58:46 +0000 (+0100) Subject: [Ada] Enable removal of side-effects in component declarations X-Git-Tag: basepoints/gcc-13~6837 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a344c79824904d3903805ff2c2113af64af8b16;p=thirdparty%2Fgcc.git [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 --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 1189870bd604..78797f64165e 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