aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/gna/issue1419/model_pkg.vhdl12
-rw-r--r--testsuite/gna/issue1419/repro1.vhdl16
-rw-r--r--testsuite/gna/issue1419/repro2.vhdl12
-rw-r--r--testsuite/gna/issue1419/tb.vhdl8
-rwxr-xr-xtestsuite/gna/issue1419/testsuite.sh12
5 files changed, 57 insertions, 3 deletions
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