aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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"