aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/synth/issue1158/max.vhdl19
-rwxr-xr-xtestsuite/synth/issue1158/testsuite.sh9
2 files changed, 28 insertions, 0 deletions
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"