aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/synth/issue1313/issue.vhdl17
-rwxr-xr-xtestsuite/synth/issue1313/testsuite.sh7
-rw-r--r--testsuite/testenv.sh6
3 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/synth/issue1313/issue.vhdl b/testsuite/synth/issue1313/issue.vhdl
new file mode 100644
index 000000000..7c5a7a938
--- /dev/null
+++ b/testsuite/synth/issue1313/issue.vhdl
@@ -0,0 +1,17 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity issue is
+end issue;
+
+architecture beh of issue is
+begin
+ assert "+"(unsigned'("0001"), unsigned'("0001")) = unsigned'("0010");
+ assert "-"(unsigned'("0001"), unsigned'("0001")) = unsigned'("0000");
+ assert "="(unsigned'("0001"), unsigned'("0001"));
+
+ assert "+"(signed'("0001"), signed'("0001")) = signed'("0010");
+ assert "-"(signed'("0001"), signed'("0001")) = signed'("0000");
+ assert "="(signed'("0001"), signed'("0001"));
+end architecture beh;
diff --git a/testsuite/synth/issue1313/testsuite.sh b/testsuite/synth/issue1313/testsuite.sh
new file mode 100755
index 000000000..53b1b69ab
--- /dev/null
+++ b/testsuite/synth/issue1313/testsuite.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth_only issue
+
+echo "Test successful"
diff --git a/testsuite/testenv.sh b/testsuite/testenv.sh
index 4de0838a4..a935b01b5 100644
--- a/testsuite/testenv.sh
+++ b/testsuite/testenv.sh
@@ -119,6 +119,12 @@ synth_failure ()
fi
}
+# Synthesis of a single file
+synth_only()
+{
+ synth $1.vhdl -e > syn_$1.vhdl
+}
+
# Synthesis of a single file and analyze the result
synth_analyze()
{