aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/ticket70/bug.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/ticket70/bug.vhdl')
-rw-r--r--testsuite/gna/ticket70/bug.vhdl26
1 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/gna/ticket70/bug.vhdl b/testsuite/gna/ticket70/bug.vhdl
new file mode 100644
index 000000000..eb6d24fee
--- /dev/null
+++ b/testsuite/gna/ticket70/bug.vhdl
@@ -0,0 +1,26 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity ent is
+end entity;
+
+architecture a of ent is
+begin
+ main : process
+ procedure proc(constant value : unsigned) is
+ variable a : integer := value'length;
+ variable b : integer := (value'length - 1)/2;
+ begin
+ report "x = " & integer'image(a);
+ report "(x-1)/2 = " & integer'image(b);
+ assert a = 0 and b = 0 severity failure;
+ end procedure;
+
+ variable value : unsigned(0 downto 1);
+ begin
+ proc(unsigned'(""));
+ proc(value);
+ wait;
+ end process;
+end architecture;