From 59b6bb2d77a9ecf08fbb4dee1a670388c3ccd32f Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 15 Feb 2017 07:00:15 +0100 Subject: synth: Fix handling of iir_downto in synth_indexed_name. --- src/synth/synth-expr.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/synth') diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index 6f5f0a9f9..80f76a1c4 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -489,7 +489,7 @@ package body Synth.Expr is when Iir_To => return Bit_Extract (Pfx, Uns32 (Idx - Rng.Left)); when Iir_Downto => - return Bit_Extract (Pfx, Uns32 (Rng.Right - Idx)); + return Bit_Extract (Pfx, Uns32 (Rng.Left - Idx)); end case; end Synth_Indexed_Name; -- cgit v1.2.3