aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vhdl/translate/trans-chap7.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vhdl/translate/trans-chap7.adb b/src/vhdl/translate/trans-chap7.adb
index aeffd32ea..4ab48bdca 100644
--- a/src/vhdl/translate/trans-chap7.adb
+++ b/src/vhdl/translate/trans-chap7.adb
@@ -186,6 +186,12 @@ package body Trans.Chap7 is
Assocs : constant Iir := Get_Association_Choices_Chain (Aggr);
Vect : Iir_Array (0 .. Integer (Len - 1));
begin
+ if Len = 0 then
+ -- Should be automatically handled, but fails with some
+ -- old versions of gnat (gnatgpl 2014 with -O).
+ return;
+ end if;
+
Build_Array_Choices_Vector (Vect, Index_Range, Assocs);
if Dim = Nbr_Dims then