summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/ticket43/bug.vhdl13
-rw-r--r--testsuite/gna/ticket43/file1.vhd41
-rw-r--r--testsuite/gna/ticket43/file2.vhd13
-rwxr-xr-xtestsuite/gna/ticket43/testsuite.sh13
-rw-r--r--testsuite/gna/ticket44/file1.vhd23
-rw-r--r--testsuite/gna/ticket44/file2.vhd13
-rwxr-xr-xtestsuite/gna/ticket44/testsuite.sh10
7 files changed, 126 insertions, 0 deletions
diff --git a/testsuite/gna/ticket43/bug.vhdl b/testsuite/gna/ticket43/bug.vhdl
new file mode 100644
index 0000000..970835c
--- /dev/null
+++ b/testsuite/gna/ticket43/bug.vhdl
@@ -0,0 +1,13 @@
+entity bug is
+end;
+
+use work.pkg.all;
+
+architecture behav of bug is
+begin
+ p: process
+ variable rec : rec_t;
+ begin
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/ticket43/file1.vhd b/testsuite/gna/ticket43/file1.vhd
new file mode 100644
index 0000000..7ad0a89
--- /dev/null
+++ b/testsuite/gna/ticket43/file1.vhd
@@ -0,0 +1,41 @@
+package pkg is
+ type rec_t is record
+ boolean_field : boolean;
+ integer_field : integer;
+ end record;
+
+ type other_rec_t is record
+ integer_field : integer;
+ end record;
+
+ type protected_t is protected
+ end protected protected_t;
+
+ procedure proc(variable prot : inout protected_t; variable rec : inout rec_t);
+ procedure proc(variable prot : inout protected_t; variable rec : inout other_rec_t);
+end package;
+
+package body pkg is
+ type protected_t is protected body
+ end protected body protected_t;
+
+ procedure proc (variable prot : inout protected_t; variable rec : inout rec_t) is
+ begin
+ end;
+
+ procedure proc(variable prot : inout protected_t; variable rec : inout other_rec_t) is
+ begin
+ end;
+end package body;
+
+use work.pkg.all;
+
+package other_pkg is
+ shared variable default_prot : protected_t;
+
+ procedure other_proc(variable rec : inout rec_t);
+ alias other_proc is proc[protected_t, rec_t];
+
+ procedure other_proc(variable rec : inout other_rec_t);
+ alias other_proc is proc[protected_t, other_rec_t];
+end package;
diff --git a/testsuite/gna/ticket43/file2.vhd b/testsuite/gna/ticket43/file2.vhd
new file mode 100644
index 0000000..0265adf
--- /dev/null
+++ b/testsuite/gna/ticket43/file2.vhd
@@ -0,0 +1,13 @@
+use work.pkg.all;
+
+package body other_pkg is
+ procedure other_proc(variable rec : inout rec_t) is
+ begin
+ proc(default_prot, rec);
+ end;
+
+ procedure other_proc(variable rec : inout other_rec_t) is
+ begin
+ proc(default_prot, rec);
+ end;
+end package body;
diff --git a/testsuite/gna/ticket43/testsuite.sh b/testsuite/gna/ticket43/testsuite.sh
new file mode 100755
index 0000000..8e27e9a
--- /dev/null
+++ b/testsuite/gna/ticket43/testsuite.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze --std=02 file1.vhd
+analyze --std=02 file2.vhd
+analyze --std=02 bug.vhdl
+
+elab_simulate --std=02 bug
+
+clean
+
+echo "Test successful"
diff --git a/testsuite/gna/ticket44/file1.vhd b/testsuite/gna/ticket44/file1.vhd
new file mode 100644
index 0000000..06c6dda
--- /dev/null
+++ b/testsuite/gna/ticket44/file1.vhd
@@ -0,0 +1,23 @@
+package pkg is
+ type protected_t is protected
+ end protected protected_t;
+
+ procedure proc(variable prot : inout protected_t; variable result : out boolean);
+end package;
+
+package body pkg is
+ type protected_t is protected body
+ end protected body protected_t;
+
+ procedure proc(variable prot : inout protected_t; variable result : out boolean) is
+ begin
+ end;
+end package body pkg;
+
+use work.pkg.all;
+
+package other_pkg is
+ procedure other_proc(variable result : out boolean);
+ alias other_proc is proc[protected_t, boolean];
+ impure function other_proc return boolean;
+end package;
diff --git a/testsuite/gna/ticket44/file2.vhd b/testsuite/gna/ticket44/file2.vhd
new file mode 100644
index 0000000..a9566d5
--- /dev/null
+++ b/testsuite/gna/ticket44/file2.vhd
@@ -0,0 +1,13 @@
+package body other_pkg is
+ procedure other_proc (
+ variable result : out boolean) is
+ begin
+ end;
+
+ impure function other_proc
+ return boolean is
+ variable result : boolean;
+ begin
+ return result;
+ end function other_proc;
+end package body other_pkg;
diff --git a/testsuite/gna/ticket44/testsuite.sh b/testsuite/gna/ticket44/testsuite.sh
new file mode 100755
index 0000000..45495a2
--- /dev/null
+++ b/testsuite/gna/ticket44/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze --std=02 file1.vhd
+analyze --std=02 file2.vhd
+
+clean
+
+echo "Test successful"