From 26235c3d1e04457801365f9028a1ac3ac58c08a6 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 12 Jun 2019 18:41:32 +0200 Subject: Add a testcase for previous commit. --- testsuite/gna/bug0101/repro1.ref | 1 + testsuite/gna/bug0101/repro1.vhdl | 10 ++++++++++ testsuite/gna/bug0101/testsuite.sh | 15 +++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 testsuite/gna/bug0101/repro1.ref create mode 100644 testsuite/gna/bug0101/repro1.vhdl create mode 100755 testsuite/gna/bug0101/testsuite.sh (limited to 'testsuite') diff --git a/testsuite/gna/bug0101/repro1.ref b/testsuite/gna/bug0101/repro1.ref new file mode 100644 index 000000000..1c5cbc8cf --- /dev/null +++ b/testsuite/gna/bug0101/repro1.ref @@ -0,0 +1 @@ +repro1.vhdl:7:16: no declaration for "sig1" diff --git a/testsuite/gna/bug0101/repro1.vhdl b/testsuite/gna/bug0101/repro1.vhdl new file mode 100644 index 000000000..cee8c1111 --- /dev/null +++ b/testsuite/gna/bug0101/repro1.vhdl @@ -0,0 +1,10 @@ +entity repro1 is +end repro1; + +architecture behav of repro1 is + signal sig : bit_vector (7 downto 0); +begin + g : for i in sig1'range generate + sig (i) <= sig (i) and '1'; + end generate; +end behav; diff --git a/testsuite/gna/bug0101/testsuite.sh b/testsuite/gna/bug0101/testsuite.sh new file mode 100755 index 000000000..4162baab2 --- /dev/null +++ b/testsuite/gna/bug0101/testsuite.sh @@ -0,0 +1,15 @@ +#! /bin/sh + +. ../../testenv.sh + +# Expect only one error. +analyze_failure repro1.vhdl 2> repro1.err +if ! diff --strip-trailing-cr repro1.err repro1.ref; then + echo "unexpected output" + exit 1; +fi + +rm -f repro1.err +clean + +echo "Test successful" -- cgit v1.2.3