From d6556ba57fb0a340ab23197fbc5c6bf0b0b46b3b Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 28 Nov 2018 19:05:35 +0100 Subject: Add testcase for #710 --- testsuite/gna/issue710/ent1.vhdl | 27 +++++++++++++++++++++++++++ testsuite/gna/issue710/ent2.vhdl | 29 +++++++++++++++++++++++++++++ testsuite/gna/issue710/testsuite.sh | 14 ++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 testsuite/gna/issue710/ent1.vhdl create mode 100644 testsuite/gna/issue710/ent2.vhdl create mode 100755 testsuite/gna/issue710/testsuite.sh (limited to 'testsuite') diff --git a/testsuite/gna/issue710/ent1.vhdl b/testsuite/gna/issue710/ent1.vhdl new file mode 100644 index 000000000..df618a5bd --- /dev/null +++ b/testsuite/gna/issue710/ent1.vhdl @@ -0,0 +1,27 @@ +package pkg is + procedure foo; +end package; + +package body pkg is + procedure foo is + begin + report "pkg foo"; + end procedure; +end package body; + +entity ent is +end entity; + +architecture a of ent is + procedure foo is + begin + report "arch foo"; + end procedure; +begin + main : process + use work.pkg.foo; + begin + foo; -- Causes ambiguity error but not if use clause is moved to architecture declarative region. + wait; + end process; +end architecture; diff --git a/testsuite/gna/issue710/ent2.vhdl b/testsuite/gna/issue710/ent2.vhdl new file mode 100644 index 000000000..d42c8f839 --- /dev/null +++ b/testsuite/gna/issue710/ent2.vhdl @@ -0,0 +1,29 @@ +package pkg is + procedure foo; +end package; + +package body pkg is + procedure foo is + begin + report "pkg foo"; + end procedure; +end package body; + +entity ent is +end entity; + +architecture a of ent is + use work.pkg.foo; +begin + blk: block + procedure foo is + begin + report "arch foo"; + end procedure; + begin + main : process + begin + foo; + end process; + end block; +end architecture; diff --git a/testsuite/gna/issue710/testsuite.sh b/testsuite/gna/issue710/testsuite.sh new file mode 100755 index 000000000..1ce9e2b8c --- /dev/null +++ b/testsuite/gna/issue710/testsuite.sh @@ -0,0 +1,14 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze ent1.vhdl +elab_simulate ent + +clean + +analyze ent2.vhdl + +clean + +echo "Test successful" -- cgit v1.2.3