aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue204/repro.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/issue204/repro.vhdl')
-rw-r--r--testsuite/gna/issue204/repro.vhdl22
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/gna/issue204/repro.vhdl b/testsuite/gna/issue204/repro.vhdl
new file mode 100644
index 000000000..09abdbbcb
--- /dev/null
+++ b/testsuite/gna/issue204/repro.vhdl
@@ -0,0 +1,22 @@
+package SortListGenericPkg is
+ generic (
+ type ElementType;
+ type ArrayofElementType;
+ function array_length(A : ArrayofElementType) return natural;
+ function element_get(A : ArrayofElementType; index : natural) return ElementType
+ );
+
+ function inside (constant E : ElementType; constant A : in ArrayofElementType) return boolean ;
+end package;
+
+package body SortListGenericPkg is
+ function inside (constant E : ElementType; constant A : in ArrayofElementType) return boolean is
+ begin
+ for i in 0 to array_length(A) - 1 loop --A'range loop
+ if E = element_get(A, i) then
+ return TRUE ;
+ end if ;
+ end loop ;
+ return FALSE ;
+ end function inside ;
+end package body;