From f799167806ca928333eb9df4ca03ccacc7f63088 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 14 Mar 2020 09:28:42 +0100 Subject: testsuite/synth: add test for #1158 --- testsuite/synth/issue1158/max.vhdl | 19 +++++++++++++++++++ testsuite/synth/issue1158/testsuite.sh | 9 +++++++++ 2 files changed, 28 insertions(+) create mode 100644 testsuite/synth/issue1158/max.vhdl create mode 100755 testsuite/synth/issue1158/testsuite.sh (limited to 'testsuite') diff --git a/testsuite/synth/issue1158/max.vhdl b/testsuite/synth/issue1158/max.vhdl new file mode 100644 index 000000000..32b3b508a --- /dev/null +++ b/testsuite/synth/issue1158/max.vhdl @@ -0,0 +1,19 @@ +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; + +entity max is + generic( + A : positive := 5; + B : positive := 7 + ); + port( + dummy : std_logic + ); +end max; + +architecture test of max is + constant cst : positive := maximum(A,B); +begin + assert cst = 7 severity error; +end architecture; diff --git a/testsuite/synth/issue1158/testsuite.sh b/testsuite/synth/issue1158/testsuite.sh new file mode 100755 index 000000000..27289e928 --- /dev/null +++ b/testsuite/synth/issue1158/testsuite.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +. ../../testenv.sh + +GHDL_STD_FLAGS=--std=08 +synth_analyze max +clean + +echo "Test successful" -- cgit v1.2.3