aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-21 21:32:47 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-21 21:32:47 +0200
commitbaca4659950b461dcbfec08046ad6360362bcf8b (patch)
treeb64ca014c4d7fb90c1f34eb3855b4a7a50c66df7 /testsuite
parentdbd8dc2d6daa658e149195889226816922c7602d (diff)
downloadghdl-baca4659950b461dcbfec08046ad6360362bcf8b.tar.gz
ghdl-baca4659950b461dcbfec08046ad6360362bcf8b.tar.bz2
ghdl-baca4659950b461dcbfec08046ad6360362bcf8b.zip
testsuite/synth: add a test for #1333
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/synth/issue1333/ascending_attribute.vhdl19
-rwxr-xr-xtestsuite/synth/issue1333/testsuite.sh8
2 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/synth/issue1333/ascending_attribute.vhdl b/testsuite/synth/issue1333/ascending_attribute.vhdl
new file mode 100644
index 000000000..96631003c
--- /dev/null
+++ b/testsuite/synth/issue1333/ascending_attribute.vhdl
@@ -0,0 +1,19 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity ascending_attribute is
+ port (
+ a : in std_logic_vector(7 downto 0);
+ b : out boolean
+ );
+end ascending_attribute;
+
+architecture rtl of ascending_attribute is
+ function is_ascending(i : std_logic_vector) return boolean is
+ begin
+ return i'ASCENDING;
+ end function;
+begin
+ b <= is_ascending(a);
+ assert not is_ascending(a);
+end rtl;
diff --git a/testsuite/synth/issue1333/testsuite.sh b/testsuite/synth/issue1333/testsuite.sh
new file mode 100755
index 000000000..4b5678d23
--- /dev/null
+++ b/testsuite/synth/issue1333/testsuite.sh
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth_analyze ascending_attribute
+clean
+
+echo "Test successful"