From b03a25ff5a173bac72b54198af40b2a3594431fc Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 16 Jul 2020 08:27:54 -0400 Subject: [PATCH] [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. --- gcc/ada/contracts.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb index e633e19..71a9bf1 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 -- 2.7.4