From 12dc6a5f65855cc74a908774855653ee9bbfac91 Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Tue, 27 Apr 2004 18:02:08 +0000 Subject: regress check for macro presence/failure in bounded attrib declaration --- regress/gnu/egcs/gcc-bounds/Makefile | 4 ++-- regress/gnu/egcs/gcc-bounds/declare-14.c | 8 ++++++++ regress/gnu/egcs/gcc-bounds/declare-14.c.exp.gcc3 | 0 regress/gnu/egcs/gcc-bounds/declare-15.c | 6 ++++++ regress/gnu/egcs/gcc-bounds/declare-15.c.exp.gcc3 | 2 ++ 5 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 regress/gnu/egcs/gcc-bounds/declare-14.c create mode 100644 regress/gnu/egcs/gcc-bounds/declare-14.c.exp.gcc3 create mode 100644 regress/gnu/egcs/gcc-bounds/declare-15.c create mode 100644 regress/gnu/egcs/gcc-bounds/declare-15.c.exp.gcc3 (limited to 'regress/gnu/egcs/gcc-bounds') 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 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 -- cgit v1.2.3