aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/statements/for-loops/dynamic_package_procedure_for_loop.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/vests/vhdl-93/clifton-labs/compliant/functional/statements/for-loops/dynamic_package_procedure_for_loop.vhdl')
-rw-r--r--testsuite/vests/vhdl-93/clifton-labs/compliant/functional/statements/for-loops/dynamic_package_procedure_for_loop.vhdl30
1 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/statements/for-loops/dynamic_package_procedure_for_loop.vhdl b/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/statements/for-loops/dynamic_package_procedure_for_loop.vhdl
new file mode 100644
index 000000000..48d810f63
--- /dev/null
+++ b/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/statements/for-loops/dynamic_package_procedure_for_loop.vhdl
@@ -0,0 +1,30 @@
+package pkg is
+ procedure iterate (
+ input : in bit_vector);
+end pkg;
+
+package body pkg is
+ procedure iterate (
+ input : in bit_vector) is
+ variable j : integer := input'range'left;
+ begin -- iterate
+ for i in input'range loop
+ assert i = j report "TEST FAILED" severity failure;
+ j := j + 1;
+ end loop; -- i in 1 to 10
+ assert j = input'range'right + 1 report "TEST FAILED" severity failure;
+ end iterate;
+end pkg;
+
+entity test is
+end test;
+
+architecture only of test is
+begin -- only
+ doit: process
+ begin -- process doit
+ work.pkg.iterate("0000");
+ report "TEST PASSED";
+ wait;
+ end process doit;
+end only;