From 808bc3fc0865eb9174f9ad35fe2f96de953c2522 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 1 Oct 2019 20:03:11 +0200 Subject: synth: fix a crash on choice by range for aggregate. --- src/synth/synth-expr.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index 12579b1eb..886b2c46b 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -321,7 +321,8 @@ package body Synth.Expr is Rng := Synth_Discrete_Range_Expression (Syn_Inst, Ch); Val := Create_Value_Discrete (Rng.Left, - Get_Value_Type (Syn_Inst, Get_Type (Ch))); + Get_Value_Type (Syn_Inst, + Get_Base_Type (Get_Type (Ch)))); while In_Range (Rng, Val.Scal) loop Set_Elem (Get_Index_Offset (Val, Bound, Ch)); Update_Index (Rng, Val.Scal); -- cgit v1.2.3