From f4e8faae688d96a9bf072b95d9e29dce84bd3271 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 23 Mar 2020 06:58:28 +0100 Subject: testsuite/synth: add a test for #1169 --- testsuite/synth/issue1169/bug.vhdl | 24 ++++++++++++++++++++++++ testsuite/synth/issue1169/testsuite.sh | 8 ++++++++ 2 files changed, 32 insertions(+) create mode 100644 testsuite/synth/issue1169/bug.vhdl create mode 100755 testsuite/synth/issue1169/testsuite.sh (limited to 'testsuite') diff --git a/testsuite/synth/issue1169/bug.vhdl b/testsuite/synth/issue1169/bug.vhdl new file mode 100644 index 000000000..d843b770e --- /dev/null +++ b/testsuite/synth/issue1169/bug.vhdl @@ -0,0 +1,24 @@ +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; + +entity bug is + port( + dummy : in std_ulogic + ); +end bug; + +architecture behav of bug is + constant VALUES_END : positive := 1; + constant ARRAY_LENGTH : positive := 16; + + subtype value_t is integer range 0 to VALUES_END-1; + type array_t is array (0 to ARRAY_LENGTH-1) of value_t; + + signal idx : integer range 0 to ARRAY_LENGTH-1; + signal value : value_t; + + signal array_v : array_t; +begin + array_v(idx) <= value; +end architecture; diff --git a/testsuite/synth/issue1169/testsuite.sh b/testsuite/synth/issue1169/testsuite.sh new file mode 100755 index 000000000..121ca9a6a --- /dev/null +++ b/testsuite/synth/issue1169/testsuite.sh @@ -0,0 +1,8 @@ +#! /bin/sh + +. ../../testenv.sh + +synth_analyze bug +clean + +echo "Test successful" -- cgit v1.2.3