aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue641/test_2b_record_subtype_alias/Test.vhd
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/issue641/test_2b_record_subtype_alias/Test.vhd')
-rw-r--r--testsuite/gna/issue641/test_2b_record_subtype_alias/Test.vhd33
1 files changed, 33 insertions, 0 deletions
diff --git a/testsuite/gna/issue641/test_2b_record_subtype_alias/Test.vhd b/testsuite/gna/issue641/test_2b_record_subtype_alias/Test.vhd
new file mode 100644
index 000000000..7e22615d2
--- /dev/null
+++ b/testsuite/gna/issue641/test_2b_record_subtype_alias/Test.vhd
@@ -0,0 +1,33 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+use work.TestPkg.all ;
+
+entity test is
+ port(
+ input : in ARecType
+ );
+end entity;
+
+architecture rtl of test is
+ signal copy : input'subtype; -- fails
+-- signal copy : ARecType(A(input.A'range)) ; -- Works
+
+ alias B is copy ;
+
+-- Inconjunction with input'subtype the following all fail.
+-- alias B : ARecType(A(input.A'range)) is copy ; -- with failing case, causes runtime bounds check failure
+-- alias B : ARecType(A(7 downto 0)) is copy ;
+-- subtype BType is AReCType(A(7 downto 0)) ;
+-- alias B : BType is copy ;
+begin
+ copy <= input ;
+
+ process
+ begin
+ wait on copy ; -- Suppress first run
+ report "Copy.A, B.A = " & to_hstring(Copy.A) & ", " & to_hstring(B.A) ;
+ end process ;
+
+end architecture;