From c00074985783c13dce54de3814c39e76cf269268 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 19 Jun 2018 06:41:31 +0200 Subject: Add reproducer for #606 --- testsuite/gna/issue606/repro1a.vhdl | 15 +++++++++++++++ testsuite/gna/issue606/repro1b.vhdl | 17 +++++++++++++++++ testsuite/gna/issue606/testsuite.sh | 10 ++++++++++ 3 files changed, 42 insertions(+) create mode 100644 testsuite/gna/issue606/repro1a.vhdl create mode 100644 testsuite/gna/issue606/repro1b.vhdl create mode 100755 testsuite/gna/issue606/testsuite.sh (limited to 'testsuite') 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" -- cgit v1.2.3