summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/chkp-stropt-5.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/chkp-stropt-5.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c
new file mode 100644
index 00000000000..8d08ee60e74
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target mpx } */
+/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */
+/* { dg-final { scan-tree-dump "memcpy_nobnd" "chkpopt" } } */
+/* { dg-final { cleanup-tree-dump "chkpopt" } } */
+
+#include "string.h"
+
+void test (int *buf1, int *buf2, size_t len)
+{
+ memcpy (buf1, buf2, len);
+}