From c880f680c6fb9d8bf3aee56149a53ea30ded7ffb Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 27 Oct 2017 20:39:14 +0200 Subject: Add testcase for #449 --- testsuite/gna/issue449/repro1.vhdl | 18 ++++++++++++++++++ testsuite/gna/issue449/repro2.vhdl | 20 ++++++++++++++++++++ testsuite/gna/issue449/testsuite.sh | 10 ++++++++++ 3 files changed, 48 insertions(+) create mode 100644 testsuite/gna/issue449/repro1.vhdl create mode 100644 testsuite/gna/issue449/repro2.vhdl create mode 100755 testsuite/gna/issue449/testsuite.sh diff --git a/testsuite/gna/issue449/repro1.vhdl b/testsuite/gna/issue449/repro1.vhdl new file mode 100644 index 000000000..67f0d6b62 --- /dev/null +++ b/testsuite/gna/issue449/repro1.vhdl @@ -0,0 +1,18 @@ +entity asd is +end entity; +architecture aa of asd is +type ia is array (natural range <>) of integer; + +function a return ia is +begin +return (1,2); +end function; +function a (s : integer) return ia is +begin +return (1,2); +end function; + +signal ad : integer; +begin +ad <= a(1); +end architecture; diff --git a/testsuite/gna/issue449/repro2.vhdl b/testsuite/gna/issue449/repro2.vhdl new file mode 100644 index 000000000..e523d692e --- /dev/null +++ b/testsuite/gna/issue449/repro2.vhdl @@ -0,0 +1,20 @@ +entity asd2 is +end entity; + +architecture aa of asd2 is +type ia is array (natural range <>) of integer; + +function a return ia is +begin +return (1,2); +end function; + +function a (s : integer) return integer is +begin +return 1; +end function; + +signal ad : integer; +begin +ad <= a(1); +end architecture; diff --git a/testsuite/gna/issue449/testsuite.sh b/testsuite/gna/issue449/testsuite.sh new file mode 100755 index 000000000..c9bb5f695 --- /dev/null +++ b/testsuite/gna/issue449/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze repro1.vhdl +analyze_failure repro2.vhdl + +clean + +echo "Test successful" -- cgit v1.2.3