From 1ae3bebbc7565975906805dcebe204cb17e7a121 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 5 Jun 2019 20:32:15 +0200 Subject: Add a test for previous two commits. --- testsuite/gna/bug0100/notype1.vhdl | 14 ++++++++++++++ testsuite/gna/bug0100/testsuite.sh | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100644 testsuite/gna/bug0100/notype1.vhdl (limited to 'testsuite/gna') diff --git a/testsuite/gna/bug0100/notype1.vhdl b/testsuite/gna/bug0100/notype1.vhdl new file mode 100644 index 000000000..009354b36 --- /dev/null +++ b/testsuite/gna/bug0100/notype1.vhdl @@ -0,0 +1,14 @@ +entity sub1 is + port (i : bit_vector); +end; + +entity notype1 is +end; + +architecture behav of notype1 is + type counter_t is array (2 downto 0) of (31 downto 0); + signal cnts : counter_t; +begin + i : entity work.sub1 + port map (i => cnts (0)); +end; diff --git a/testsuite/gna/bug0100/testsuite.sh b/testsuite/gna/bug0100/testsuite.sh index 27d530133..5f1ca87df 100755 --- a/testsuite/gna/bug0100/testsuite.sh +++ b/testsuite/gna/bug0100/testsuite.sh @@ -3,6 +3,13 @@ . ../../testenv.sh analyze_failure --force-analysis inst1.vhdl +analyze_failure --force-analysis notype1.vhdl + +if analyze_failure --force-analysis notype1.vhdl 2>&1 | grep -q "indexed name"; then + : +else + echo "FAIL: missing error message from semantic analysis" +fi clean -- cgit v1.2.3