From 37c6a396d128d88cde148da60e0ac81fab1c6e62 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 17 Apr 2020 18:06:05 +0200 Subject: testsuite/synth: add a test for #1237 --- testsuite/synth/issue1237/mwe.vhdl | 23 +++++++++++++++++++++++ testsuite/synth/issue1237/testsuite.sh | 7 +++++++ 2 files changed, 30 insertions(+) create mode 100644 testsuite/synth/issue1237/mwe.vhdl create mode 100755 testsuite/synth/issue1237/testsuite.sh (limited to 'testsuite/synth/issue1237') diff --git a/testsuite/synth/issue1237/mwe.vhdl b/testsuite/synth/issue1237/mwe.vhdl new file mode 100644 index 000000000..0121b3a09 --- /dev/null +++ b/testsuite/synth/issue1237/mwe.vhdl @@ -0,0 +1,23 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity MWE is +end MWE; + +architecture test of MWE is + constant P : integer := 1; + signal my_sig : std_logic_vector(P downto 0); +begin + block2: if P = 2 generate + my_sig(2) <= '1'; + end generate; + + block1: if P = 1 generate + my_sig(1) <= '1'; + end generate; + + -- even this block alone breaks during analysis + blockf: if false generate + my_sig(2) <= '1'; + end generate; +end architecture; diff --git a/testsuite/synth/issue1237/testsuite.sh b/testsuite/synth/issue1237/testsuite.sh new file mode 100755 index 000000000..fb89d4e19 --- /dev/null +++ b/testsuite/synth/issue1237/testsuite.sh @@ -0,0 +1,7 @@ +#! /bin/sh + +. ../../testenv.sh + +synth mwe.vhdl -e > syn_mwe.vhdl + +echo "Test successful" -- cgit v1.2.3