Skip to content

Commit

Permalink
testsuite/gna: add reproducer for #1419
Browse files Browse the repository at this point in the history
  • Loading branch information
tgingold committed Aug 5, 2021
1 parent 8c5fdb9 commit 6f7e1cc
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 3 deletions.
12 changes: 12 additions & 0 deletions testsuite/gna/issue1419/model_pkg.vhdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package model_pkg is
type t_record is
record
--srt : string (1 downto 1); -- works
srt : string;
num : natural;
end record;

type t_record_array is array (natural range <>) of t_record;

constant k : t_record_array := (("a", 0), ("b", 1));
end package;
16 changes: 16 additions & 0 deletions testsuite/gna/issue1419/repro1.vhdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
entity repro1 is
end;

architecture behav of repro1 is
type t_record is
record
--srt : string (1 downto 1); -- works
srt : string;
num : positive;
end record;

type t_record_array is array (natural range <>) of t_record;

constant k : t_record_array := (("a", 1), ("b", 2));
begin
end;
12 changes: 12 additions & 0 deletions testsuite/gna/issue1419/repro2.vhdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
entity repro2 is
end;

architecture behav of repro2 is
type t_record is record
str : string;
num : positive;
end record;

constant k : t_record := ("abc", 1);
begin
end;
8 changes: 8 additions & 0 deletions testsuite/gna/issue1419/tb.vhdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
entity tb is
end;

use work.model_pkg.all;

architecture behav of tb is
begin
end;
12 changes: 9 additions & 3 deletions testsuite/gna/issue1419/testsuite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ export GHDL_STD_FLAGS=--std=08
analyze_failure -Werror repro3.vhdl
analyze_failure -Werror repro4.vhdl

#analyze model_pkg.vhdl
#analyze tb
#elab_simulate tb
analyze repro1.vhdl
elab_simulate repro1

analyze repro2.vhdl
elab_simulate repro2

analyze model_pkg.vhdl
analyze tb.vhdl
elab_simulate tb

clean

Expand Down

0 comments on commit 6f7e1cc

Please sign in to comment.