diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-01-19 04:21:38 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-01-19 04:21:38 +0100 |
commit | 3e24b144af77e0551c71e7fe9cc1f53e04883349 (patch) | |
tree | be5abf446e89208bf31f37a29c8a85283c7b6532 /src/vhdl | |
parent | 005c57ece3507c4336c51f36b2febd2e6c3b4835 (diff) | |
download | ghdl-3e24b144af77e0551c71e7fe9cc1f53e04883349.tar.gz ghdl-3e24b144af77e0551c71e7fe9cc1f53e04883349.tar.bz2 ghdl-3e24b144af77e0551c71e7fe9cc1f53e04883349.zip |
evaluation: work-around gnatgpl 2014 bug.
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/evaluation.adb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vhdl/evaluation.adb b/src/vhdl/evaluation.adb index cbdec289f..f41a6a50d 100644 --- a/src/vhdl/evaluation.adb +++ b/src/vhdl/evaluation.adb @@ -585,9 +585,12 @@ package body Evaluation is Build_Array_Choices_Vector (Vect, Index_Range, Assocs); List := Create_Iir_List; - for I in Vect'Range loop - Append_Element (List, Get_Associated_Expr (Vect (I))); - end loop; + if Len > 0 then + -- Workaround GNAT GPL2014 compiler bug. + for I in Vect'Range loop + Append_Element (List, Get_Associated_Expr (Vect (I))); + end loop; + end if; return Build_Simple_Aggregate (List, Aggr, Aggr_Type); end Aggregate_To_Simple_Aggregate; |