aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/gna/issue606/repro1a.vhdl15
-rw-r--r--testsuite/gna/issue606/repro1b.vhdl17
-rwxr-xr-xtestsuite/gna/issue606/testsuite.sh10
3 files changed, 42 insertions, 0 deletions
diff --git a/testsuite/gna/issue606/repro1a.vhdl b/testsuite/gna/issue606/repro1a.vhdl
new file mode 100644
index 000000000..755d45664
--- /dev/null
+++ b/testsuite/gna/issue606/repro1a.vhdl
@@ -0,0 +1,15 @@
+entity repro1a is
+ generic (depth : natural := 3);
+end repro1a;
+
+architecture behav of repro1a is
+ component repro1b is
+ generic (depth : natural);
+ end component;
+begin
+ assert false report "repro1a: depth = " & natural'image (depth)
+ severity note;
+
+ comp1a : repro1b
+ generic map (depth => depth);
+end behav;
diff --git a/testsuite/gna/issue606/repro1b.vhdl b/testsuite/gna/issue606/repro1b.vhdl
new file mode 100644
index 000000000..6e6814bbb
--- /dev/null
+++ b/testsuite/gna/issue606/repro1b.vhdl
@@ -0,0 +1,17 @@
+entity repro1b is
+ generic (depth : natural);
+end repro1b;
+
+architecture behav of repro1b is
+ component repro1a is
+ generic (depth : natural);
+ end component;
+begin
+ assert false report "repro1b: depth = " & natural'image (depth)
+ severity note;
+
+ g : if depth > 0 generate
+ comp1b : repro1a
+ generic map (depth => depth - 1);
+ end generate;
+end behav;
diff --git a/testsuite/gna/issue606/testsuite.sh b/testsuite/gna/issue606/testsuite.sh
new file mode 100755
index 000000000..f6ff9658c
--- /dev/null
+++ b/testsuite/gna/issue606/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze repro1a.vhdl repro1b.vhdl
+elab_simulate repro1a
+
+clean
+
+echo "Test successful"