aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/types/array-types/unconstrained_argument.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/vests/vhdl-93/clifton-labs/compliant/functional/types/array-types/unconstrained_argument.vhdl')
-rw-r--r--testsuite/vests/vhdl-93/clifton-labs/compliant/functional/types/array-types/unconstrained_argument.vhdl21
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/types/array-types/unconstrained_argument.vhdl b/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/types/array-types/unconstrained_argument.vhdl
new file mode 100644
index 000000000..d530af926
--- /dev/null
+++ b/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/types/array-types/unconstrained_argument.vhdl
@@ -0,0 +1,21 @@
+entity test is
+end test;
+
+architecture only of test is
+ function get_left (
+ constant input_array : bit_vector)
+ return bit is
+ begin
+ return input_array(input_array'left);
+ end get_left;
+begin -- only
+ process
+ constant argument1 : bit_vector( 0 to 3 ) := "0000";
+ constant argument2 : bit_vector( 0 to 4 ) := "11111";
+ begin -- process
+ assert get_left( argument1 ) = '0' report "TEST FAILED" severity failure;
+ assert get_left( argument2 ) = '1' report "TEST FAILED" severity failure;
+ report "TEST PASSED";
+ wait;
+ end process;
+end only;