diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-07-29 03:59:15 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-07-30 07:03:40 +0200 |
commit | ceac775f4fc250a6299022005109699d58b451e3 (patch) | |
tree | 96e2eb99f6c3ac6e0482571007cd673aaf81eb60 /testsuite/gna/issue126 | |
parent | c226d31d9657cbf97beefe86c31fdb1361f7ba46 (diff) | |
download | ghdl-ceac775f4fc250a6299022005109699d58b451e3.tar.gz ghdl-ceac775f4fc250a6299022005109699d58b451e3.tar.bz2 ghdl-ceac775f4fc250a6299022005109699d58b451e3.zip |
Add testcase from issue #126
Diffstat (limited to 'testsuite/gna/issue126')
-rw-r--r-- | testsuite/gna/issue126/seg_fault.vhdl | 25 | ||||
-rwxr-xr-x | testsuite/gna/issue126/testsuite.sh | 13 |
2 files changed, 38 insertions, 0 deletions
diff --git a/testsuite/gna/issue126/seg_fault.vhdl b/testsuite/gna/issue126/seg_fault.vhdl new file mode 100644 index 000000000..dab7c14af --- /dev/null +++ b/testsuite/gna/issue126/seg_fault.vhdl @@ -0,0 +1,25 @@ +package pa is + type t is range 0 to 3; +end package; + +use work.pa.t; +package pb is + function f (a,b:t) return t ; + function "="(a,b:t) return boolean; +end package; + +use work.pa."+"; +-- This side note is not part of the bug report: with vhdl pre-2008 this use clause should be required (I think) and it is not +-- use work.pa."="; +package body pb is + function f (a,b:t) return t is begin return a+b; end function; + function "="(a,b:t) return boolean is begin return a=b; end function; +end package body; + +use work.pa.all; -- fails with and without this use clause +use work.pb.f; +use work.pb."="; -- this causes the problem +entity e is begin + assert f(1,2)=0 severity note; +end entity; +architecture a of e is begin end architecture; diff --git a/testsuite/gna/issue126/testsuite.sh b/testsuite/gna/issue126/testsuite.sh new file mode 100755 index 000000000..5d38dfe1f --- /dev/null +++ b/testsuite/gna/issue126/testsuite.sh @@ -0,0 +1,13 @@ +#! /bin/sh + +. ../../testenv.sh + +GHDL_STD_FLAGS=--std=08 +analyze seg_fault.vhdl +elab e + +# Do not simulate: infinite recursion. + +clean + +echo "Test successful" |