From 946b468a8143e94c329ed4a7b1a085221b3f5472 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 8 Jan 2014 21:15:58 +0100 Subject: Rework implementation of -frelaxed-rules, add bug20767. --- testsuite/gna/bug20767/aggr.vhdl | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 testsuite/gna/bug20767/aggr.vhdl (limited to 'testsuite/gna/bug20767/aggr.vhdl') diff --git a/testsuite/gna/bug20767/aggr.vhdl b/testsuite/gna/bug20767/aggr.vhdl new file mode 100644 index 0000000..2fb3202 --- /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; -- cgit