aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue440
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-12-06 20:28:37 +0100
committerTristan Gingold <tgingold@free.fr>2018-12-06 20:28:37 +0100
commit3276b70eb3495f9ec871ba65003315acd499af5a (patch)
tree87a00773e704ccc9aacbdcd55891149defec50c1 /testsuite/gna/issue440
parent4ace23e95c0b9e5f0c789461ac966c22cfac3dcb (diff)
downloadghdl-3276b70eb3495f9ec871ba65003315acd499af5a.tar.gz
ghdl-3276b70eb3495f9ec871ba65003315acd499af5a.tar.bz2
ghdl-3276b70eb3495f9ec871ba65003315acd499af5a.zip
Add testcase for #440.
Diffstat (limited to 'testsuite/gna/issue440')
-rw-r--r--testsuite/gna/issue440/ent.vhdl19
-rw-r--r--testsuite/gna/issue440/ent2.vhdl19
-rwxr-xr-xtestsuite/gna/issue440/testsuite.sh2
3 files changed, 40 insertions, 0 deletions
diff --git a/testsuite/gna/issue440/ent.vhdl b/testsuite/gna/issue440/ent.vhdl
new file mode 100644
index 000000000..0333fade5
--- /dev/null
+++ b/testsuite/gna/issue440/ent.vhdl
@@ -0,0 +1,19 @@
+package gpkg is
+ generic (const : natural);
+end package;
+
+package ipkg is new work.gpkg generic map (const => 1);
+
+entity ent is
+end entity;
+
+architecture a of ent is
+begin
+ main : process
+ begin
+ -- Case 1
+ assert work.ipkg.const = 1; -- Should this result in a 'no declaration of const' error?
+ -- case 2
+-- assert << constant @work.ipkg.const : natural>> = 1; -- Should this be visible?
+ end process;
+end architecture;
diff --git a/testsuite/gna/issue440/ent2.vhdl b/testsuite/gna/issue440/ent2.vhdl
new file mode 100644
index 000000000..51eae7b0c
--- /dev/null
+++ b/testsuite/gna/issue440/ent2.vhdl
@@ -0,0 +1,19 @@
+package gpkg2 is
+ generic (const : natural);
+end package;
+
+package ipkg2 is new work.gpkg2 generic map (const => 1);
+
+entity ent2 is
+end entity;
+
+architecture a of ent2 is
+begin
+ main : process
+ begin
+ -- Case 1
+ assert work.ipkg.const = 1; -- Should this result in a 'no declaration of const' error?
+ -- case 2
+ assert << constant @work.ipkg.const : natural>> = 1; -- Should this be visible?
+ end process;
+end architecture;
diff --git a/testsuite/gna/issue440/testsuite.sh b/testsuite/gna/issue440/testsuite.sh
index 3840a8714..b7cacad5b 100755
--- a/testsuite/gna/issue440/testsuite.sh
+++ b/testsuite/gna/issue440/testsuite.sh
@@ -9,6 +9,8 @@ elab_simulate e3
analyze e2.vhdl
elab_simulate e2
+analyze_failure ent.vhdl
+
# Not yet fixed
# analyze e.vhdl