1 /* PR middle-end/29215 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-ccp1" } */
5 char buf
[5 * sizeof (int) + 1] __attribute__((aligned (__alignof__ (int))));
8 foo (int arg1
, int arg2
, int arg3
, int arg4
, int arg5
)
10 __builtin_memcpy (buf
, &arg1
, sizeof (int));
11 __builtin_memcpy (buf
+ sizeof (int), &arg2
, sizeof (int));
12 __builtin_memcpy (buf
+ 2 * sizeof (int), &arg3
, sizeof (int));
13 __builtin_memcpy (buf
+ 3 * sizeof (int), &arg4
, sizeof (int));
14 __builtin_memcpy (buf
+ 4 * sizeof (int), &arg5
, sizeof (int));
20 union { char buf
[4]; int i
; } u
;
26 foo (u
.i
, u
.i
, u
.i
, u
.i
, u
.i
);
27 buf
[5 * sizeof (int)] = '\0';
32 /* { dg-final { scan-tree-dump-not "memcpy" "ccp1" } } */