diff options
Diffstat (limited to 'testsuite/gna/issue2166/repro4.vhdl')
-rw-r--r-- | testsuite/gna/issue2166/repro4.vhdl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/gna/issue2166/repro4.vhdl b/testsuite/gna/issue2166/repro4.vhdl new file mode 100644 index 000000000..09c2fbeba --- /dev/null +++ b/testsuite/gna/issue2166/repro4.vhdl @@ -0,0 +1,23 @@ +entity repro4 is +end; + +architecture behav of repro4 is + function InitMemoryBaseType(Size : integer) return integer_vector is + begin + return (1 to Size => 0); + end InitMemoryBaseType; + + subtype MemoryBaseType is integer_vector ; + type MemBlockType is array (integer range <>) of MemoryBaseType ; + type MemBlockPtrType is access MemBlockType ; +begin + process + variable MemArr : MemBlockPtrType; + variable BlockWidth : natural := 4; + begin + MemArr := new MemBlockType (0 to BlockWidth - 1)(0 to 31); + report natural'image(memarr'length); + report natural'image(memarr'element'length); + wait; + end process; +end; |