diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-12-24 15:37:06 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-12-24 15:37:06 +0100 |
commit | aa10e0e6a0c8e613b70abd17c7ec841d8108d942 (patch) | |
tree | dbb290604976d7a7b1dcf76960e09dac02a0d470 /src | |
parent | 6ca0825a544a910aa4e74f87dc366b15344aca74 (diff) | |
download | ghdl-aa10e0e6a0c8e613b70abd17c7ec841d8108d942.tar.gz ghdl-aa10e0e6a0c8e613b70abd17c7ec841d8108d942.tar.bz2 ghdl-aa10e0e6a0c8e613b70abd17c7ec841d8108d942.zip |
trans-chap7: workaround compiler bug.
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/translate/trans-chap7.adb | 6 |
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 |