summaryrefslogtreecommitdiff
path: root/regress/gnu/egcs/gcc-bounds/memcpy-1.c
diff options
context:
space:
mode:
authorAnil Madhavapeddy <avsm@cvs.openbsd.org>2003-06-26 18:37:30 +0000
committerAnil Madhavapeddy <avsm@cvs.openbsd.org>2003-06-26 18:37:30 +0000
commitb6c1e3dcfb1950398a56baf7ac32394a5715461e (patch)
treee31acec24b5273e867a097df284f49f36c832d83 /regress/gnu/egcs/gcc-bounds/memcpy-1.c
parent8266dbf611a37e02c83c4da428f21a7d8c5bf801 (diff)
various regression tests for -Wbounded
Diffstat (limited to 'regress/gnu/egcs/gcc-bounds/memcpy-1.c')
-rw-r--r--regress/gnu/egcs/gcc-bounds/memcpy-1.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/regress/gnu/egcs/gcc-bounds/memcpy-1.c b/regress/gnu/egcs/gcc-bounds/memcpy-1.c
new file mode 100644
index 00000000000..02fa5181c65
--- /dev/null
+++ b/regress/gnu/egcs/gcc-bounds/memcpy-1.c
@@ -0,0 +1,8 @@
+#include <string.h>
+
+int main(int argc, char **argv) {
+ char buf[10];
+ char buf2[10] = "123456789";
+ memcpy(buf, buf2, sizeof buf);
+ return 1;
+}