From 05a0a9c919e70079e93a2608020f8a1042bb7dc9 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 28 Nov 2019 18:39:43 +0100 Subject: testsuite: add test case for #1043 --- testsuite/synth/issue1043/ent.vhdl | 22 ++++++++++++++++++++++ testsuite/synth/issue1043/testsuite.sh | 12 ++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 testsuite/synth/issue1043/ent.vhdl create mode 100755 testsuite/synth/issue1043/testsuite.sh (limited to 'testsuite/synth') diff --git a/testsuite/synth/issue1043/ent.vhdl b/testsuite/synth/issue1043/ent.vhdl new file mode 100644 index 000000000..0d0b83ea2 --- /dev/null +++ b/testsuite/synth/issue1043/ent.vhdl @@ -0,0 +1,22 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity ent is + generic ( + g : natural := 8 + ); + port ( + o1 : out std_logic; + o2 : out std_logic + ); +end; + +architecture a of ent is + constant x : real := real(g); + + constant a : natural := g; + constant y : real := real(a); +begin + o1 <= '1' when integer(x) = 8 else '0'; + o2 <= '1' when integer(y) = 8 else '0'; +end; diff --git a/testsuite/synth/issue1043/testsuite.sh b/testsuite/synth/issue1043/testsuite.sh new file mode 100755 index 000000000..bc454cfda --- /dev/null +++ b/testsuite/synth/issue1043/testsuite.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +. ../../testenv.sh + +for t in ent; do + synth $t.vhdl -e $t > syn_$t.vhdl + analyze syn_$t.vhdl +done + +clean + +echo "Test successful" -- cgit v1.2.3