aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gcc.target/i386/memcpy-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gcc.target/i386/memcpy-1.c')
-rw-r--r--gcc-4.8/gcc/testsuite/gcc.target/i386/memcpy-1.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gcc.target/i386/memcpy-1.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/memcpy-1.c
new file mode 100644
index 000000000..bc6f95ab6
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/gcc.target/i386/memcpy-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target ia32 } */
+/* { dg-options "-O2 -march=pentiumpro -minline-all-stringops" } */
+/* { dg-final { scan-assembler "rep" } } */
+/* { dg-final { scan-assembler "movs" } } */
+/* { dg-final { scan-assembler-not "test" } } */
+/* { dg-final { scan-assembler "\.L?:" } } */
+
+/* A and B are aligned, but we used to lose track of it.
+ Ensure that memcpy is inlined and alignment prologue is missing. */
+
+char a[2048];
+char b[2048];
+t()
+{
+ __builtin_memcpy (a,b,2048);
+}