From 5338523d5109fbb29d74da91241f1a9f2f8dc653 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 19 Jun 2017 20:45:00 +0200 Subject: Add reproducer for #370 --- testsuite/gna/issue370/repro.vhdl | 26 ++++++++++++++++++++++++++ testsuite/gna/issue370/testsuite.sh | 11 +++++++++++ 2 files changed, 37 insertions(+) create mode 100644 testsuite/gna/issue370/repro.vhdl create mode 100755 testsuite/gna/issue370/testsuite.sh (limited to 'testsuite/gna') diff --git a/testsuite/gna/issue370/repro.vhdl b/testsuite/gna/issue370/repro.vhdl new file mode 100644 index 000000000..2a69be06f --- /dev/null +++ b/testsuite/gna/issue370/repro.vhdl @@ -0,0 +1,26 @@ +entity repro is +end; + +architecture behav of repro is + function f return natural is + begin + return 5; + end f; + + constant cst : natural := f; + + type rec1 is record + r : bit_vector (1 to cst); + end record; + + type rec is record + v : bit_vector; + r : rec1; + end record; + + procedure assign (signal s : out rec; val : rec) is + begin + s <= val; + end assign; +begin +end behav; diff --git a/testsuite/gna/issue370/testsuite.sh b/testsuite/gna/issue370/testsuite.sh new file mode 100755 index 000000000..8d22a2073 --- /dev/null +++ b/testsuite/gna/issue370/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze repro.vhdl +elab_simulate repro + +clean + +echo "Test successful" -- cgit v1.2.3