aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/string-opt-1.c
diff options
context:
space:
mode:
authorno-author <no-author@gcc.gnu.org>2003-06-03 16:53:07 +0000
committerno-author <no-author@gcc.gnu.org>2003-06-03 16:53:07 +0000
commit6a595b409c4a16bf07bddc89d6713105109548fd (patch)
treef61762dde1bdadf0d316d2d2a7fff23eab68fc73 /gcc/testsuite/gcc.dg/string-opt-1.c
parent6b9957dfa3e1468c5c35aea4c39613d562a7a5c9 (diff)
This commit was manufactured by cvs2svn to create branch
'tree-ssa-20020619-branch'. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@67385 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/string-opt-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/string-opt-1.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/string-opt-1.c b/gcc/testsuite/gcc.dg/string-opt-1.c
new file mode 100644
index 00000000000..bc0f30098fa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/string-opt-1.c
@@ -0,0 +1,11 @@
+/* Ensure mempcpy is not "optimized" into memcpy followed by addition. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void *
+fn (char *x, char *y, int z)
+{
+ return __builtin_mempcpy (x, y, z);
+}
+
+/* { dg-final { scan-assembler-not "memcpy" } } */