From 6f7e1ccde2eab638c15d7c651c23629af6f0f8b6 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 4 Aug 2021 10:28:09 +0200 Subject: testsuite/gna: add reproducer for #1419 --- testsuite/gna/issue1419/model_pkg.vhdl | 12 ++++++++++++ testsuite/gna/issue1419/repro1.vhdl | 16 ++++++++++++++++ testsuite/gna/issue1419/repro2.vhdl | 12 ++++++++++++ testsuite/gna/issue1419/tb.vhdl | 8 ++++++++ testsuite/gna/issue1419/testsuite.sh | 12 +++++++++--- 5 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 testsuite/gna/issue1419/model_pkg.vhdl create mode 100644 testsuite/gna/issue1419/repro1.vhdl create mode 100644 testsuite/gna/issue1419/repro2.vhdl create mode 100644 testsuite/gna/issue1419/tb.vhdl (limited to 'testsuite') diff --git a/testsuite/gna/issue1419/model_pkg.vhdl b/testsuite/gna/issue1419/model_pkg.vhdl new file mode 100644 index 000000000..2ea1d00fd --- /dev/null +++ b/testsuite/gna/issue1419/model_pkg.vhdl @@ -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; diff --git a/testsuite/gna/issue1419/repro1.vhdl b/testsuite/gna/issue1419/repro1.vhdl new file mode 100644 index 000000000..605d5b04b --- /dev/null +++ b/testsuite/gna/issue1419/repro1.vhdl @@ -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; diff --git a/testsuite/gna/issue1419/repro2.vhdl b/testsuite/gna/issue1419/repro2.vhdl new file mode 100644 index 000000000..a80baa1d6 --- /dev/null +++ b/testsuite/gna/issue1419/repro2.vhdl @@ -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; diff --git a/testsuite/gna/issue1419/tb.vhdl b/testsuite/gna/issue1419/tb.vhdl new file mode 100644 index 000000000..916010bb7 --- /dev/null +++ b/testsuite/gna/issue1419/tb.vhdl @@ -0,0 +1,8 @@ +entity tb is +end; + +use work.model_pkg.all; + +architecture behav of tb is +begin +end; diff --git a/testsuite/gna/issue1419/testsuite.sh b/testsuite/gna/issue1419/testsuite.sh index c40322e93..dad15d292 100755 --- a/testsuite/gna/issue1419/testsuite.sh +++ b/testsuite/gna/issue1419/testsuite.sh @@ -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 -- cgit v1.2.3