Skip to content

Commit

Permalink
Add a testcase for #1152
Browse files Browse the repository at this point in the history
  • Loading branch information
tgingold committed Mar 6, 2020
1 parent 0e4a428 commit 3418818
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
19 changes: 19 additions & 0 deletions testsuite/gna/issue1152/ent.vhdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
entity ent is
end;

architecture arch of ent is

type range_t is array (integer range <>) of bit;

function get_range (constant code : string) return range_t is
constant ret_val : range_t(1 to 10) := (others => '0');
begin
return ret_val;
end function get_range;

signal ret_val : boolean_vector(get_range("HELLO")'range) := (others => false);

--constant ret_range : range_t := get_range("HELLO");
--signal ret_val : boolean_vector(ret_range) := (others => false);
begin
end;
11 changes: 11 additions & 0 deletions testsuite/gna/issue1152/testsuite.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /bin/sh

. ../../testenv.sh

export GHDL_STD_FLAGS=--std=08
analyze_failure ent.vhdl
analyze -frelaxed ent.vhdl

clean

echo "Test successful"

0 comments on commit 3418818

Please sign in to comment.