From e76eabaf3218147eb162ff99f9a38fbb958cb06c Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 29 May 2018 06:08:26 +0200 Subject: Add reproducer for #581 --- testsuite/gna/issue581/LinkedListPkg.vhd | 21 +++++++++++++++++++++ testsuite/gna/issue581/Test_LinkedListPkg.vhd | 26 ++++++++++++++++++++++++++ testsuite/gna/issue581/testsuite.sh | 12 ++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 testsuite/gna/issue581/LinkedListPkg.vhd create mode 100644 testsuite/gna/issue581/Test_LinkedListPkg.vhd create mode 100755 testsuite/gna/issue581/testsuite.sh 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" -- cgit v1.2.3