summaryrefslogtreecommitdiff
path: root/testsuite/gna/bug017/case2.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/bug017/case2.vhdl')
-rw-r--r--testsuite/gna/bug017/case2.vhdl28
1 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/gna/bug017/case2.vhdl b/testsuite/gna/bug017/case2.vhdl
new file mode 100644
index 0000000..eff79c5
--- /dev/null
+++ b/testsuite/gna/bug017/case2.vhdl
@@ -0,0 +1,28 @@
+entity case1 is
+end;
+
+architecture behav of case1 is
+ type vec2 is array (natural range <>) of bit_vector (1 to 4);
+ constant vects : vec2 := (x"0", x"4", x"9", x"3", x"a");
+begin
+ process
+ variable i : natural := 0;
+ begin
+ for i in vects'range loop
+ case vects (i) is
+ when "0100" =>
+ report "value is 4";
+ wait for 4 ns;
+ when "0011" =>
+ report "value is 3";
+ wait for 3 ns;
+ when others =>
+ report "unknown value";
+ wait for 1 ns;
+ end case;
+ end loop;
+ report "SUCCESS";
+ wait;
+ end process;
+
+end behav;