aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1158
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-14 09:28:42 +0100
committerTristan Gingold <tgingold@free.fr>2020-03-14 09:28:42 +0100
commitf799167806ca928333eb9df4ca03ccacc7f63088 (patch)
tree8931e58b090f7f2de156c1f0364f0675b95e8b69 /testsuite/synth/issue1158
parentec3a4334e1d6e2d0874da9ae84ed0aabf5ff7d5f (diff)
downloadghdl-f799167806ca928333eb9df4ca03ccacc7f63088.tar.gz
ghdl-f799167806ca928333eb9df4ca03ccacc7f63088.tar.bz2
ghdl-f799167806ca928333eb9df4ca03ccacc7f63088.zip
testsuite/synth: add test for #1158
Diffstat (limited to 'testsuite/synth/issue1158')
-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"