diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-05-29 06:08:26 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-06-01 08:23:53 +0200 |
commit | e76eabaf3218147eb162ff99f9a38fbb958cb06c (patch) | |
tree | 2afcb3bf901e2990d43384a52b371bb2b722cf40 /testsuite/gna | |
parent | 981322e4a8e3e09446bc37631fd2c46880ad4cfa (diff) | |
download | ghdl-e76eabaf3218147eb162ff99f9a38fbb958cb06c.tar.gz ghdl-e76eabaf3218147eb162ff99f9a38fbb958cb06c.tar.bz2 ghdl-e76eabaf3218147eb162ff99f9a38fbb958cb06c.zip |
Add reproducer for #581
Diffstat (limited to 'testsuite/gna')
-rw-r--r-- | testsuite/gna/issue581/LinkedListPkg.vhd | 21 | ||||
-rw-r--r-- | testsuite/gna/issue581/Test_LinkedListPkg.vhd | 26 | ||||
-rwxr-xr-x | testsuite/gna/issue581/testsuite.sh | 12 |
3 files changed, 59 insertions, 0 deletions
diff --git a/testsuite/gna/issue581/LinkedListPkg.vhd b/testsuite/gna/issue581/LinkedListPkg.vhd new file mode 100644 index 000000000..87f6cbf69 --- /dev/null +++ b/testsuite/gna/issue581/LinkedListPkg.vhd @@ -0,0 +1,21 @@ +--! @author Trip Richert + +library ieee; +use ieee.std_logic_1164.all; + +package LinkedListPkg is + generic ( + type elem_type + ); + + type LinkedList; + type LinkedListPtr is access LinkedList; + + type LinkedList is record + elem : elem_type; + nextPtr : LinkedListPtr; + end record LinkedList; + + +end package LinkedListPkg; + diff --git a/testsuite/gna/issue581/Test_LinkedListPkg.vhd b/testsuite/gna/issue581/Test_LinkedListPkg.vhd new file mode 100644 index 000000000..bddf3fcd5 --- /dev/null +++ b/testsuite/gna/issue581/Test_LinkedListPkg.vhd @@ -0,0 +1,26 @@ +library ieee; +use ieee.std_logic_1164.all; +library std; +use std.textio.all; + + +entity test_linkedListPkg is + package NaturalLinkedListPackage is new work.LinkedListPkg generic map(natural); + use NaturalLinkedListPackage.all; +end entity test_linkedListPkg; + +architecture behavioral of test_linkedListPkg is + +begin + process + variable list : LinkedListPtr; + variable l : line; + variable cnt : natural; + begin + write (l, cnt); + writeline (output, l); + wait; + end process; + +end architecture behavioral; + diff --git a/testsuite/gna/issue581/testsuite.sh b/testsuite/gna/issue581/testsuite.sh new file mode 100755 index 000000000..019afef4b --- /dev/null +++ b/testsuite/gna/issue581/testsuite.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze LinkedListPkg.vhd +analyze Test_LinkedListPkg.vhd +elab_simulate Test_LinkedListPkg + +clean + +echo "Test successful" |