diff options
Diffstat (limited to 'testsuite/gna/issue2112/abc.vhdl')
-rw-r--r-- | testsuite/gna/issue2112/abc.vhdl | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/testsuite/gna/issue2112/abc.vhdl b/testsuite/gna/issue2112/abc.vhdl new file mode 100644 index 000000000..137bacf81 --- /dev/null +++ b/testsuite/gna/issue2112/abc.vhdl @@ -0,0 +1,49 @@ +library ieee;
+use ieee.std_logic_1164.all;
+
+package abc is
+ type Parameters_t is record
+ BW : natural;
+ PAIRS : natural;
+ end record;
+
+ type Indices_t is array (natural range <>) of std_logic_vector;
+
+ type Bus_t is record
+ Indices : Indices_t;
+ end record;
+
+ function Test(
+ abc_bus : Bus_t
+ ) return Bus_t;
+
+ function Test(
+ abc_bus : Bus_t;
+ indices : Indices_t
+ ) return Bus_t;
+end package;
+
+package body abc is
+ function Test(
+ abc_bus : Bus_t;
+ indices : Indices_t
+ ) return Bus_t is
+ variable result : Bus_t(
+ Indices(abc_bus.Indices'range)(abc_bus.Indices'element'range)
+ ) := Test(abc_bus);
+ begin
+ return result;
+ end function;
+
+ function Test(
+ abc_bus : Bus_t
+ ) return Bus_t is
+ variable result : Bus_t(
+ Indices(abc_bus.Indices'range)(abc_bus.Indices'element'range)
+ ) := abc_bus;
+ begin
+ return result;
+ end function;
+end package body;
+
+
|