From c9f6a193253ca2e8ce8059c16d2c56c679c9c13d Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 6 May 2022 06:07:46 +0200 Subject: testsuite/gna: add a test for #2050 --- testsuite/gna/issue2050/test_pkg.vhdl | 16 ++++++++++++++++ testsuite/gna/issue2050/testsuite.sh | 9 +++++++++ 2 files changed, 25 insertions(+) create mode 100644 testsuite/gna/issue2050/test_pkg.vhdl create mode 100755 testsuite/gna/issue2050/testsuite.sh (limited to 'testsuite') diff --git a/testsuite/gna/issue2050/test_pkg.vhdl b/testsuite/gna/issue2050/test_pkg.vhdl new file mode 100644 index 000000000..4b1ef2c96 --- /dev/null +++ b/testsuite/gna/issue2050/test_pkg.vhdl @@ -0,0 +1,16 @@ +package test_pkg is + type rec_t is record + comp_1 : integer; + end record; + + constant REC_DEFAULT : rec_t := (comp_1 => 0); + + procedure proc(param : integer := REC_DEFAULT.comp_1); +end package; + +package body test_pkg is + procedure proc(param : integer := REC_DEFAULT.comp_1) is + begin + null; + end procedure; +end package body; diff --git a/testsuite/gna/issue2050/testsuite.sh b/testsuite/gna/issue2050/testsuite.sh new file mode 100755 index 000000000..91b0d3fbe --- /dev/null +++ b/testsuite/gna/issue2050/testsuite.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze test_pkg.vhdl + +clean + +echo "Test successful" -- cgit v1.2.3