aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/gna/bug052/tb.vhdl11
-rw-r--r--testsuite/gna/bug052/tb_simple.vhdl11
-rw-r--r--testsuite/gna/bug052/tb_simple1.vhdl12
-rw-r--r--testsuite/gna/bug052/tb_simple2.vhdl13
-rwxr-xr-xtestsuite/gna/bug052/testsuite.sh18
5 files changed, 65 insertions, 0 deletions
diff --git a/testsuite/gna/bug052/tb.vhdl b/testsuite/gna/bug052/tb.vhdl
new file mode 100644
index 000000000..5b266ef04
--- /dev/null
+++ b/testsuite/gna/bug052/tb.vhdl
@@ -0,0 +1,11 @@
+entity tb is
+ package pkg1 is
+ constant c : natural := 5;
+ end pkg1;
+end tb;
+
+architecture behav of tb is
+begin
+ assert pkg1.c = 5 severity failure;
+ assert pkg1.c /= 5 report "value is correct" severity note;
+end behav;
diff --git a/testsuite/gna/bug052/tb_simple.vhdl b/testsuite/gna/bug052/tb_simple.vhdl
new file mode 100644
index 000000000..4ba82f6b0
--- /dev/null
+++ b/testsuite/gna/bug052/tb_simple.vhdl
@@ -0,0 +1,11 @@
+entity tb_simple is
+ package pkg1 is
+ constant c : natural := 5;
+ end pkg1;
+end tb_simple;
+
+architecture behav of tb_simple is
+begin
+ assert pkg1.c = 5 severity failure;
+ assert pkg1.c /= 5 report "value is correct" severity note;
+end behav;
diff --git a/testsuite/gna/bug052/tb_simple1.vhdl b/testsuite/gna/bug052/tb_simple1.vhdl
new file mode 100644
index 000000000..636f62802
--- /dev/null
+++ b/testsuite/gna/bug052/tb_simple1.vhdl
@@ -0,0 +1,12 @@
+entity tb_simple1 is
+ generic (v : natural := 4);
+ package pkg1 is
+ constant c : natural := v + 1;
+ end pkg1;
+end tb_simple1;
+
+architecture behav of tb_simple1 is
+begin
+ assert pkg1.c = 5 severity failure;
+ assert pkg1.c /= 5 report "value is correct" severity note;
+end behav;
diff --git a/testsuite/gna/bug052/tb_simple2.vhdl b/testsuite/gna/bug052/tb_simple2.vhdl
new file mode 100644
index 000000000..e137dd070
--- /dev/null
+++ b/testsuite/gna/bug052/tb_simple2.vhdl
@@ -0,0 +1,13 @@
+entity tb_simple2 is
+ generic (v : natural := 4);
+ package pkg1 is
+ constant c : natural := v + 1;
+ end pkg1;
+ constant c : natural := v - 1;
+end;
+
+architecture behav of tb_simple2 is
+begin
+ assert pkg1.c = 5 and c = 3 severity failure;
+ assert not (pkg1.c = 5 and c = 3) report "value is correct" severity note;
+end behav;
diff --git a/testsuite/gna/bug052/testsuite.sh b/testsuite/gna/bug052/testsuite.sh
new file mode 100755
index 000000000..2c0b5185e
--- /dev/null
+++ b/testsuite/gna/bug052/testsuite.sh
@@ -0,0 +1,18 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+
+analyze tb_simple.vhdl
+elab_simulate tb_simple
+
+analyze tb_simple1.vhdl
+elab_simulate tb_simple1
+
+analyze tb_simple2.vhdl
+elab_simulate tb_simple2
+
+clean
+
+echo "Test successful"