From: Arnaud Charlet Date: Thu, 16 Jul 2020 12:27:54 +0000 (-0400) Subject: [Ada] Crash on precondition, discriminant and protected objects X-Git-Tag: basepoints/gcc-12~4159 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b03a25ff5a173bac72b54198af40b2a3594431fc;p=thirdparty%2Fgcc.git [Ada] Crash on precondition, discriminant and protected objects gcc/ada/ * contracts.adb (Is_Prologue_Renaming): This function was missing support for E_Constant which can also be generated in protected objects. --- diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb index e633e19c1d84..71a9bf143e47 100644 --- a/gcc/ada/contracts.adb +++ b/gcc/ada/contracts.adb @@ -2333,7 +2333,7 @@ package body Contracts is -- A renamed private component is just a component of -- _object, with an arbitrary name. - elsif Ekind (Obj) = E_Variable + elsif Ekind (Obj) in E_Variable | E_Constant and then Nkind (Pref) = N_Identifier and then Chars (Pref) = Name_uObject and then Nkind (Sel) = N_Identifier