From e2e34ed0c93f2e1180f98f3d86df96884d51c8d1 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 30 Jul 2015 18:13:02 +0200 Subject: * gcc.target/i386/pr66648.c: Move to correct place. From-SVN: r226409 --- gcc/testsuite/gcc.target/i386/pr66648.c | 33 +++++++++++++++++++++++++++++++++ gcc/testsuite/gcc.target/pr66648.c | 33 --------------------------------- 2 files changed, 33 insertions(+), 33 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr66648.c delete mode 100644 gcc/testsuite/gcc.target/pr66648.c (limited to 'gcc') diff --git a/gcc/testsuite/gcc.target/i386/pr66648.c b/gcc/testsuite/gcc.target/i386/pr66648.c new file mode 100644 index 0000000..88c126f --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr66648.c @@ -0,0 +1,33 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -mstringop-strategy=unrolled_loop -mtune=nocona" } */ + +#define PATTERN 0xdeadbeef +#define SIZE 32 + +struct S { int i; char str[SIZE]; int j; }; + +void __attribute__((noclone, noinline)) +my_memcpy (char *, const char *, unsigned int); + +void +my_memcpy (char *dst, const char *src, unsigned int len) +{ + if (len < 8) + __builtin_abort (); + + __builtin_memcpy (dst, src, len); +} + +int +main (void) +{ + const char str[SIZE]= "1234567890123456789012345678901"; + struct S *s = __builtin_malloc (sizeof (struct S)); + + s->j = PATTERN; + my_memcpy (s->str, str, SIZE); + if (s->j != PATTERN) + __builtin_abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/pr66648.c b/gcc/testsuite/gcc.target/pr66648.c deleted file mode 100644 index 88c126f..0000000 --- a/gcc/testsuite/gcc.target/pr66648.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-O2 -mstringop-strategy=unrolled_loop -mtune=nocona" } */ - -#define PATTERN 0xdeadbeef -#define SIZE 32 - -struct S { int i; char str[SIZE]; int j; }; - -void __attribute__((noclone, noinline)) -my_memcpy (char *, const char *, unsigned int); - -void -my_memcpy (char *dst, const char *src, unsigned int len) -{ - if (len < 8) - __builtin_abort (); - - __builtin_memcpy (dst, src, len); -} - -int -main (void) -{ - const char str[SIZE]= "1234567890123456789012345678901"; - struct S *s = __builtin_malloc (sizeof (struct S)); - - s->j = PATTERN; - my_memcpy (s->str, str, SIZE); - if (s->j != PATTERN) - __builtin_abort (); - - return 0; -} -- cgit v1.1