summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/bug17127/bug2.vhdl28
-rwxr-xr-xtestsuite/gna/bug17127/testsuite.sh10
-rw-r--r--testsuite/gna/sr2655/bug.vhdl29
-rwxr-xr-xtestsuite/gna/sr2655/testsuite.sh10
4 files changed, 77 insertions, 0 deletions
diff --git a/testsuite/gna/bug17127/bug2.vhdl b/testsuite/gna/bug17127/bug2.vhdl
new file mode 100644
index 0000000..b4880dd
--- /dev/null
+++ b/testsuite/gna/bug17127/bug2.vhdl
@@ -0,0 +1,28 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity bug2 is
+end;
+
+architecture this of bug2 is
+ function f return integer is
+ constant cc1: std_logic_vector := "1100";
+ constant cc2: std_logic_vector := cc1;
+ variable r: std_logic_vector(3 downto 0);
+ begin
+ assert false report "case2-a: "&integer'image(cc1'length) severity note;
+ assert false report "case2-b: "&integer'image(cc2'length) severity note;--This reports "0". Correct one would be "4"!
+ return 0;
+ end;
+ constant c1: std_logic_vector := "1010";
+ constant c2: std_logic_vector := c1;
+ signal i: integer;
+begin
+ process
+ begin
+ assert false report "case1-a: "&integer'image(c1'length) severity note;
+ assert false report "case1-b: "&integer'image(c2'length) severity note;
+ i <= f;
+ wait;
+ end process;
+end;
diff --git a/testsuite/gna/bug17127/testsuite.sh b/testsuite/gna/bug17127/testsuite.sh
new file mode 100755
index 0000000..0d0b6fa
--- /dev/null
+++ b/testsuite/gna/bug17127/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze bug2.vhdl
+elab_simulate bug2
+
+clean
+
+echo "Test successful"
diff --git a/testsuite/gna/sr2655/bug.vhdl b/testsuite/gna/sr2655/bug.vhdl
new file mode 100644
index 0000000..682ece5
--- /dev/null
+++ b/testsuite/gna/sr2655/bug.vhdl
@@ -0,0 +1,29 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity bug is
+end;
+
+architecture this of bug is
+ function f return integer is
+ constant v: std_logic_vector := std_logic_vector'("01HLZX-U");
+ begin
+ assert false report "case 2 starts" severity note;
+ for i in v'range loop
+ assert false report "case 2: "&integer'image(i) severity note;
+ end loop;
+ return 0;
+ end;
+begin
+ process
+ constant v: std_logic_vector := std_logic_vector'("01HLZX-U");
+ variable a: integer;
+ begin
+ assert false report "case 1 starts" severity note;
+ for i in v'range loop
+ assert false report "case 1: "&integer'image(i) severity note;
+ end loop;
+ a := f;
+ wait;
+ end process;
+end;
diff --git a/testsuite/gna/sr2655/testsuite.sh b/testsuite/gna/sr2655/testsuite.sh
new file mode 100755
index 0000000..8fe9a94
--- /dev/null
+++ b/testsuite/gna/sr2655/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze bug.vhdl
+elab_simulate bug
+
+clean
+
+echo "Test successful"