aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-06-05 20:32:15 +0200
committerTristan Gingold <tgingold@free.fr>2019-06-05 20:32:15 +0200
commit1ae3bebbc7565975906805dcebe204cb17e7a121 (patch)
tree4e647645e42e0555c43a5296d11b62108d7af33f /testsuite/gna
parent844146f536e877cc70037f4951e772bb137e8d30 (diff)
downloadghdl-1ae3bebbc7565975906805dcebe204cb17e7a121.tar.gz
ghdl-1ae3bebbc7565975906805dcebe204cb17e7a121.tar.bz2
ghdl-1ae3bebbc7565975906805dcebe204cb17e7a121.zip
Add a test for previous two commits.
Diffstat (limited to 'testsuite/gna')
-rw-r--r--testsuite/gna/bug0100/notype1.vhdl14
-rwxr-xr-xtestsuite/gna/bug0100/testsuite.sh7
2 files changed, 21 insertions, 0 deletions
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