diff options
Diffstat (limited to 'regress/gnu/egcs/gcc-bounds/builtins-1.c')
-rw-r--r-- | regress/gnu/egcs/gcc-bounds/builtins-1.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/regress/gnu/egcs/gcc-bounds/builtins-1.c b/regress/gnu/egcs/gcc-bounds/builtins-1.c new file mode 100644 index 00000000000..ea5389b5699 --- /dev/null +++ b/regress/gnu/egcs/gcc-bounds/builtins-1.c @@ -0,0 +1,23 @@ +#include <string.h> +#include <stdio.h> +#include <stdarg.h> + +int +main(int argc, char **argv) +{ + char buf[100]; + char buf2[50]; + va_list l; + FILE *f; + bzero(buf, 200); + memcpy(buf2, buf, sizeof buf); + memcpy(buf2, buf, 105); + memset(buf, 0, 500); + strncat(buf2, "blahblah", 1000); + strncpy(buf2, buf, 1234); + snprintf(buf, 5432, "foo"); + vsnprintf(buf, 2345, "bar", l); + fwrite(buf, 123, 4, f); + return 1; +} + |