Rebase.
[official-gcc.git] / gcc / testsuite / gcc.dg / memcpy-5.c
blobdc5afed1907129c4403681a4ba8ffa8aaf03d202
1 /* { dg-options "-O -fdump-tree-optimized" } */
3 extern void *memcpy (void *, const void *, __SIZE_TYPE__);
5 #define TEST(NAME, TYPE) \
6 TYPE NAME##x; \
7 char NAME##y[sizeof (NAME##x)] __attribute__((aligned (__alignof__ (NAME##x)))); \
8 void NAME (void) { memcpy (&NAME##x, &NAME##y, sizeof (NAME##x)); }
10 TEST (f, float);
11 TEST (d, double);
12 TEST (ld, long double);
13 TEST (cf, _Complex float);
14 TEST (cd, _Complex double);
15 TEST (cld, _Complex long double);
16 TEST (d8f, float __attribute__((vector_size (8))));
17 TEST (d16f, float __attribute__((vector_size (16))));
18 TEST (d32f, float __attribute__((vector_size (32))));
19 TEST (d64f, float __attribute__((vector_size (64))));
20 TEST (d128f, float __attribute__((vector_size (128))));
21 TEST (d16d, double __attribute__((vector_size (16))));
22 TEST (d32d, double __attribute__((vector_size (32))));
23 TEST (d64d, double __attribute__((vector_size (64))));
24 TEST (d128d, double __attribute__((vector_size (128))));
26 /* { dg-final { scan-tree-dump-not "memcpy" "optimized" { target x86_64-*-* } } } */
27 /* { dg-final { cleanup-tree-dump "optimized" } } */