diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-05-06 06:07:46 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-05-06 06:07:46 +0200 |
commit | c9f6a193253ca2e8ce8059c16d2c56c679c9c13d (patch) | |
tree | ceac47a8518e4d76fd189832a7c0b8e416610f7d | |
parent | c7d8f9e27b8fa97a76a0bd638f300197823771ad (diff) | |
download | ghdl-c9f6a193253ca2e8ce8059c16d2c56c679c9c13d.tar.gz ghdl-c9f6a193253ca2e8ce8059c16d2c56c679c9c13d.tar.bz2 ghdl-c9f6a193253ca2e8ce8059c16d2c56c679c9c13d.zip |
testsuite/gna: add a test for #2050
-rw-r--r-- | testsuite/gna/issue2050/test_pkg.vhdl | 16 | ||||
-rwxr-xr-x | testsuite/gna/issue2050/testsuite.sh | 9 |
2 files changed, 25 insertions, 0 deletions
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" |