aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue2223/repro6.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/issue2223/repro6.vhdl')
-rw-r--r--testsuite/gna/issue2223/repro6.vhdl22
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/gna/issue2223/repro6.vhdl b/testsuite/gna/issue2223/repro6.vhdl
new file mode 100644
index 000000000..3bccef565
--- /dev/null
+++ b/testsuite/gna/issue2223/repro6.vhdl
@@ -0,0 +1,22 @@
+entity MemPkgReproducer6 is
+end;
+architecture behav of MemPkgReproducer6 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, BaseWidth : natural;
+ begin
+ BlockWidth := 4;
+ BaseWidth := 32;
+ MemArr := new MemBlockType'( 0 to BlockWidth - 1 => InitMemoryBaseType(BaseWidth));
+ wait;
+ end process;
+end;