aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2020-07-16 08:27:54 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2020-10-20 03:21:39 -0400
commitb03a25ff5a173bac72b54198af40b2a3594431fc (patch)
treeccfbbeba7f5c2aa4c4af3f0c2409d1994cd09a08 /gcc/ada
parent2e55a8e5b7b86886ff7f6f71e34a80c847e403e3 (diff)
downloadgcc-b03a25ff5a173bac72b54198af40b2a3594431fc.zip
gcc-b03a25ff5a173bac72b54198af40b2a3594431fc.tar.gz
gcc-b03a25ff5a173bac72b54198af40b2a3594431fc.tar.bz2
[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.
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/contracts.adb2
1 files changed, 1 insertions, 1 deletions
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