summaryrefslogtreecommitdiff
path: root/testsuite/gna/bug08
diff options
context:
space:
mode:
authorTristan Gingold2015-01-20 15:22:46 +0100
committerTristan Gingold2015-01-20 15:22:46 +0100
commit98fa5f28b2c97ce321b13660d4db969a0072f606 (patch)
tree4a27cbda417ea4f0cb8ede5cb812239f15c9e994 /testsuite/gna/bug08
parent057fe02c3e99bee64cea06c057afc2d50732baad (diff)
downloadghdl-98fa5f28b2c97ce321b13660d4db969a0072f606.tar.gz
ghdl-98fa5f28b2c97ce321b13660d4db969a0072f606.tar.bz2
ghdl-98fa5f28b2c97ce321b13660d4db969a0072f606.zip
Add testcase bug08 (ambiguous notation for parenthesis name).
Diffstat (limited to 'testsuite/gna/bug08')
-rw-r--r--testsuite/gna/bug08/paren1.vhdl15
-rw-r--r--testsuite/gna/bug08/paren10.vhdl18
-rw-r--r--testsuite/gna/bug08/paren11.vhdl19
-rw-r--r--testsuite/gna/bug08/paren12.vhdl19
-rw-r--r--testsuite/gna/bug08/paren13.vhdl23
-rw-r--r--testsuite/gna/bug08/paren2.vhdl10
-rw-r--r--testsuite/gna/bug08/paren3.vhdl10
-rw-r--r--testsuite/gna/bug08/paren4.vhdl13
-rw-r--r--testsuite/gna/bug08/paren5.vhdl13
-rw-r--r--testsuite/gna/bug08/paren6.vhdl15
-rw-r--r--testsuite/gna/bug08/paren7.vhdl15
-rw-r--r--testsuite/gna/bug08/paren8.vhdl17
-rw-r--r--testsuite/gna/bug08/paren9.vhdl17
-rwxr-xr-xtestsuite/gna/bug08/testsuite.sh12
14 files changed, 216 insertions, 0 deletions
diff --git a/testsuite/gna/bug08/paren1.vhdl b/testsuite/gna/bug08/paren1.vhdl
new file mode 100644
index 0000000..b6adba3
--- /dev/null
+++ b/testsuite/gna/bug08/paren1.vhdl
@@ -0,0 +1,15 @@
+entity paren1 is
+end paren1;
+
+architecture behav of paren1
+is
+ signal a : bit_vector (1 to 4);
+begin
+ process
+ begin
+ for b in a'range loop
+ assert a(b) = '0';
+ end loop;
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/bug08/paren10.vhdl b/testsuite/gna/bug08/paren10.vhdl
new file mode 100644
index 0000000..f3ea7f4
--- /dev/null
+++ b/testsuite/gna/bug08/paren10.vhdl
@@ -0,0 +1,18 @@
+entity paren10 is
+end paren10;
+
+architecture behav of paren10
+is
+begin
+ process
+ type string_acc is access string;
+ function a return string_acc is
+ begin
+ return new string'("hello");
+ end a;
+ constant b : natural := 2;
+ begin
+ assert a(b) = 'e';
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/bug08/paren11.vhdl b/testsuite/gna/bug08/paren11.vhdl
new file mode 100644
index 0000000..0626418
--- /dev/null
+++ b/testsuite/gna/bug08/paren11.vhdl
@@ -0,0 +1,19 @@
+entity paren11 is
+end paren11;
+
+architecture behav of paren11
+is
+begin
+ process
+ type string_acc is access string;
+ variable hel : string_acc := new string'("hello");
+ impure function a return string_acc is
+ begin
+ return hel;
+ end a;
+ constant b : natural := 2;
+ begin
+ assert a(b) = 'e';
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/bug08/paren12.vhdl b/testsuite/gna/bug08/paren12.vhdl
new file mode 100644
index 0000000..d19f2ce
--- /dev/null
+++ b/testsuite/gna/bug08/paren12.vhdl
@@ -0,0 +1,19 @@
+entity paren12 is
+end paren12;
+
+architecture behav of paren12
+is
+begin
+ proc: process
+ type string_acc is access string;
+ variable hel : string_acc := new string'("hello");
+ impure function a return string_acc is
+ begin
+ return hel;
+ end a;
+ constant b : natural := 2;
+ begin
+ assert proc.a(b) = 'e';
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/bug08/paren13.vhdl b/testsuite/gna/bug08/paren13.vhdl
new file mode 100644
index 0000000..9da0740
--- /dev/null
+++ b/testsuite/gna/bug08/paren13.vhdl
@@ -0,0 +1,23 @@
+entity paren13 is
+end paren13;
+
+architecture behav of paren13
+is
+begin
+ proc: process
+ type string_acc is access string;
+ variable hel : string_acc := new string'("hello");
+ impure function a return string_acc is
+ begin
+ return hel;
+ end a;
+ function a return natural is
+ begin
+ return 5;
+ end a;
+ constant b : natural := 2;
+ begin
+ assert proc.a(b) = 'e';
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/bug08/paren2.vhdl b/testsuite/gna/bug08/paren2.vhdl
new file mode 100644
index 0000000..bb72f1d
--- /dev/null
+++ b/testsuite/gna/bug08/paren2.vhdl
@@ -0,0 +1,10 @@
+entity paren2 is
+end paren2;
+
+architecture behav of paren2
+is
+ subtype b is natural range 1 to 4;
+ signal a : bit_vector (b);
+begin
+ assert a(b) = x"0";
+end behav;
diff --git a/testsuite/gna/bug08/paren3.vhdl b/testsuite/gna/bug08/paren3.vhdl
new file mode 100644
index 0000000..213b24e
--- /dev/null
+++ b/testsuite/gna/bug08/paren3.vhdl
@@ -0,0 +1,10 @@
+entity paren3 is
+end paren3;
+
+architecture behav of paren3
+is
+ subtype a is integer;
+ constant b : real := 3.15;
+begin
+ assert a(b) = 3;
+end behav;
diff --git a/testsuite/gna/bug08/paren4.vhdl b/testsuite/gna/bug08/paren4.vhdl
new file mode 100644
index 0000000..f45fe8f
--- /dev/null
+++ b/testsuite/gna/bug08/paren4.vhdl
@@ -0,0 +1,13 @@
+entity paren4 is
+end paren4;
+
+architecture behav of paren4
+is
+ function a (param : natural) return natural is
+ begin
+ return param + 1;
+ end a;
+ constant b : natural := 3;
+begin
+ assert a(b) = 4;
+end behav;
diff --git a/testsuite/gna/bug08/paren5.vhdl b/testsuite/gna/bug08/paren5.vhdl
new file mode 100644
index 0000000..6a8b0d7
--- /dev/null
+++ b/testsuite/gna/bug08/paren5.vhdl
@@ -0,0 +1,13 @@
+entity paren5 is
+end paren5;
+
+architecture behav of paren5
+is
+ procedure a (param : natural) is
+ begin
+ assert param /= 2;
+ end a;
+ constant b : natural := 3;
+begin
+ a(b);
+end behav;
diff --git a/testsuite/gna/bug08/paren6.vhdl b/testsuite/gna/bug08/paren6.vhdl
new file mode 100644
index 0000000..01b3a55
--- /dev/null
+++ b/testsuite/gna/bug08/paren6.vhdl
@@ -0,0 +1,15 @@
+entity paren6 is
+end paren6;
+
+architecture behav of paren6
+is
+begin
+ process
+ type string_acc is access string;
+ variable a : string_acc := new string'("hello");
+ constant b : natural := 3;
+ begin
+ assert a(b) = 'l';
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/bug08/paren7.vhdl b/testsuite/gna/bug08/paren7.vhdl
new file mode 100644
index 0000000..d3aa815
--- /dev/null
+++ b/testsuite/gna/bug08/paren7.vhdl
@@ -0,0 +1,15 @@
+entity paren7 is
+end paren7;
+
+architecture behav of paren7
+is
+begin
+ process
+ type string_acc is access string;
+ variable a : string_acc := new string'("hello");
+ subtype b is natural range 2 to 4;
+ begin
+ assert a(b) = "ell";
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/bug08/paren8.vhdl b/testsuite/gna/bug08/paren8.vhdl
new file mode 100644
index 0000000..ee4d7c1
--- /dev/null
+++ b/testsuite/gna/bug08/paren8.vhdl
@@ -0,0 +1,17 @@
+entity paren8 is
+end paren8;
+
+architecture behav of paren8
+is
+begin
+ process
+ function a return string is
+ begin
+ return "hello";
+ end a;
+ constant b : natural := 5;
+ begin
+ assert a(b) = 'o';
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/bug08/paren9.vhdl b/testsuite/gna/bug08/paren9.vhdl
new file mode 100644
index 0000000..e94a626
--- /dev/null
+++ b/testsuite/gna/bug08/paren9.vhdl
@@ -0,0 +1,17 @@
+entity paren9 is
+end paren9;
+
+architecture behav of paren9
+is
+begin
+ process
+ function a return string is
+ begin
+ return "hello";
+ end a;
+ subtype b is natural range 1 to 2;
+ begin
+ assert a(b) = "he";
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/bug08/testsuite.sh b/testsuite/gna/bug08/testsuite.sh
new file mode 100755
index 0000000..9762553
--- /dev/null
+++ b/testsuite/gna/bug08/testsuite.sh
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+for i in 1 2 3 4 5 6 7 8 9 10 11 12 13; do
+ analyze paren$i.vhdl
+ elab_simulate paren$i
+done
+
+clean
+
+echo "Test successful"