aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue205/repro1.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-12-08 04:59:37 +0100
committerTristan Gingold <tgingold@free.fr>2016-12-08 05:01:44 +0100
commit7f6e03839738cb5a57d6d9cbcd6109dd262f7977 (patch)
treec9d0eea437c3ccf9a4fe1b2c505430adca44d007 /testsuite/gna/issue205/repro1.vhdl
parent6e17825944e639625749a44088f9374652d92aad (diff)
downloadghdl-7f6e03839738cb5a57d6d9cbcd6109dd262f7977.tar.gz
ghdl-7f6e03839738cb5a57d6d9cbcd6109dd262f7977.tar.bz2
ghdl-7f6e03839738cb5a57d6d9cbcd6109dd262f7977.zip
issue #205: add instantiation.
Fix #205
Diffstat (limited to 'testsuite/gna/issue205/repro1.vhdl')
-rw-r--r--testsuite/gna/issue205/repro1.vhdl33
1 files changed, 33 insertions, 0 deletions
diff --git a/testsuite/gna/issue205/repro1.vhdl b/testsuite/gna/issue205/repro1.vhdl
new file mode 100644
index 000000000..79ccfd54f
--- /dev/null
+++ b/testsuite/gna/issue205/repro1.vhdl
@@ -0,0 +1,33 @@
+package SortListGenericPkg is
+ generic (
+ type ElementType;
+ function "<"(L : ElementType; R : ElementType) return boolean;
+ function "<="(L : ElementType; R : ElementType) return boolean
+ );
+ function f (a, b : ElementType) return boolean;
+end package;
+
+package body SortListGenericPkg is
+ function f (a, b : ElementType) return boolean is
+ begin
+ return a <= b;
+ end f;
+end;
+
+package mysort is new work.SortListGenericPkg generic map (natural, "<", "<=");
+
+entity repro is
+end repro;
+
+use work.mysort.all;
+architecture behav of repro
+is
+begin
+ process
+ variable ok : boolean;
+ begin
+ ok := f (3, 12);
+ assert ok report "bad comparaison" severity failure;
+ wait;
+ end process;
+end behav;