diff options
author | Tristan Gingold <tgingold@free.fr> | 2014-01-08 21:15:58 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2014-01-08 21:15:58 +0100 |
commit | 946b468a8143e94c329ed4a7b1a085221b3f5472 (patch) | |
tree | eda0986769ddab5f3365eaafd0f8d47471fda060 /testsuite | |
parent | d0a2d9ebd5dc8aceb21e5528721cfb31d55ecad1 (diff) | |
download | ghdl-946b468a8143e94c329ed4a7b1a085221b3f5472.tar.gz ghdl-946b468a8143e94c329ed4a7b1a085221b3f5472.tar.bz2 ghdl-946b468a8143e94c329ed4a7b1a085221b3f5472.zip |
Rework implementation of -frelaxed-rules, add bug20767.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gna/bug20767/aggr.vhdl | 30 | ||||
-rwxr-xr-x | testsuite/gna/bug20767/testsuite.sh | 14 | ||||
-rw-r--r-- | testsuite/gna/bug20767/xilname.vhdl | 11 |
3 files changed, 55 insertions, 0 deletions
diff --git a/testsuite/gna/bug20767/aggr.vhdl b/testsuite/gna/bug20767/aggr.vhdl new file mode 100644 index 000000000..2fb32023f --- /dev/null +++ b/testsuite/gna/bug20767/aggr.vhdl @@ -0,0 +1,30 @@ +package pkg1 is + type int_arr is array (natural range <>) of integer; +end pkg1; + +use work.pkg1.all; + +package pkg2 is + function func (a : int_arr) return natural; +end pkg2; + +package body pkg2 is + function func (a : int_arr) return natural is + begin + return a'length; + end func; +end pkg2; + +entity tb is +end tb; + +use work.pkg2.all; + +architecture behav of tb is +begin + process + constant c : natural := func (a => (1, 2, 3)); + begin + wait; + end process; +end behav; diff --git a/testsuite/gna/bug20767/testsuite.sh b/testsuite/gna/bug20767/testsuite.sh new file mode 100755 index 000000000..081f92f27 --- /dev/null +++ b/testsuite/gna/bug20767/testsuite.sh @@ -0,0 +1,14 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze_failure xilname.vhdl + +analyze -frelaxed-rules xilname.vhdl + +analyze aggr.vhdl +elab_simulate tb + +clean + +echo "Test successful" diff --git a/testsuite/gna/bug20767/xilname.vhdl b/testsuite/gna/bug20767/xilname.vhdl new file mode 100644 index 000000000..0b0c36a88 --- /dev/null +++ b/testsuite/gna/bug20767/xilname.vhdl @@ -0,0 +1,11 @@ +package xilnames is + + type state is (state1, state2, state3); + +end xilnames; + +use work.xilnames.all; +package xilname1 is + + constant state1 : state := state1; +end xilname1; |