summaryrefslogtreecommitdiff
path: root/regress/gnu/egcs/gcc-bounds
diff options
context:
space:
mode:
authorAnil Madhavapeddy <avsm@cvs.openbsd.org>2004-04-27 18:02:08 +0000
committerAnil Madhavapeddy <avsm@cvs.openbsd.org>2004-04-27 18:02:08 +0000
commit12dc6a5f65855cc74a908774855653ee9bbfac91 (patch)
tree12215d34476814816f137b58786bc9d2837ef948 /regress/gnu/egcs/gcc-bounds
parent3b28ed41c1bc0778f3c810e2001567aa874fb049 (diff)
regress check for macro presence/failure in bounded attrib declaration
Diffstat (limited to 'regress/gnu/egcs/gcc-bounds')
-rw-r--r--regress/gnu/egcs/gcc-bounds/Makefile4
-rw-r--r--regress/gnu/egcs/gcc-bounds/declare-14.c8
-rw-r--r--regress/gnu/egcs/gcc-bounds/declare-14.c.exp.gcc30
-rw-r--r--regress/gnu/egcs/gcc-bounds/declare-15.c6
-rw-r--r--regress/gnu/egcs/gcc-bounds/declare-15.c.exp.gcc32
5 files changed, 18 insertions, 2 deletions
diff --git a/regress/gnu/egcs/gcc-bounds/Makefile b/regress/gnu/egcs/gcc-bounds/Makefile
index ad4a2548520..5b3d4985be3 100644
--- a/regress/gnu/egcs/gcc-bounds/Makefile
+++ b/regress/gnu/egcs/gcc-bounds/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.6 2004/04/23 21:50:08 avsm Exp $
+# $OpenBSD: Makefile,v 1.7 2004/04/27 18:02:07 avsm Exp $
C_MODULES?= strlcpy strlcat getcwd memcpy fread memcpy declare \
sscanf vararray md builtins
@@ -9,7 +9,7 @@ C_STRLCAT= 1 2 3 4 5 6
C_GETCWD= 1 2 3 4
C_MEMCPY= 1 2 3 4 5 6
C_FREAD= 1 2 3 4
-C_DECLARE= 1 2 3 4 5 6 7 8 9 10 11 12 13
+C_DECLARE= 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
C_SSCANF= 1 2 3 4 5
C_VARARRAY= 1 2
C_MD= 1 2 3 4 5 6
diff --git a/regress/gnu/egcs/gcc-bounds/declare-14.c b/regress/gnu/egcs/gcc-bounds/declare-14.c
new file mode 100644
index 00000000000..2b616899b94
--- /dev/null
+++ b/regress/gnu/egcs/gcc-bounds/declare-14.c
@@ -0,0 +1,8 @@
+#define TEST_SIZE 32
+
+void my_func(char *, int, int)
+ __attribute__((__bounded__(__minbytes__,1,TEST_SIZE)));
+
+int main(int argc, char **argv) {
+ return 1;
+}
diff --git a/regress/gnu/egcs/gcc-bounds/declare-14.c.exp.gcc3 b/regress/gnu/egcs/gcc-bounds/declare-14.c.exp.gcc3
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/regress/gnu/egcs/gcc-bounds/declare-14.c.exp.gcc3
diff --git a/regress/gnu/egcs/gcc-bounds/declare-15.c b/regress/gnu/egcs/gcc-bounds/declare-15.c
new file mode 100644
index 00000000000..fe6603528ff
--- /dev/null
+++ b/regress/gnu/egcs/gcc-bounds/declare-15.c
@@ -0,0 +1,6 @@
+void my_func(char *, int, int)
+ __attribute__((__bounded__(__minbytes__,1,TEST_SIZE)));
+
+int main(int argc, char **argv) {
+ return 1;
+}
diff --git a/regress/gnu/egcs/gcc-bounds/declare-15.c.exp.gcc3 b/regress/gnu/egcs/gcc-bounds/declare-15.c.exp.gcc3
new file mode 100644
index 00000000000..98dc7e161a2
--- /dev/null
+++ b/regress/gnu/egcs/gcc-bounds/declare-15.c.exp.gcc3
@@ -0,0 +1,2 @@
+declare-15.c:2: error: `TEST_SIZE' undeclared here (not in a function)
+declare-15.c:2: error: bound length operand number is not an integer constant