2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr78408-2.c
blob89c9b7eae435c093fd7d641d6fd9c5ddf65064c2
1 /* PR c/78408 */
2 /* { dg-do compile { target size32plus } } */
3 /* { dg-options "-O2 -fdump-tree-fab1-details" } */
4 /* { dg-final { scan-tree-dump-not "after previous" "fab1" } } */
6 struct S { char a[32]; };
7 struct T { char a[65536]; };
8 void bar (int, struct S *, struct S *, struct T *, struct T *);
9 void baz (char *, char *);
11 void
12 f1 (void)
14 struct S a, b;
15 struct T c, d;
16 __builtin_memset (&b, 2, sizeof (b));
17 a = b;
18 __builtin_memset (&d, 3, sizeof (d));
19 c = d;
20 bar (3, &a, &b, &c, &d);
23 void
24 f2 (void)
26 char a[64], b[64];
27 __builtin_memset (a + 13, 2, 27);
28 __builtin_memcpy (b + 4, a + 17, 24);
29 baz (a, b);
32 void
33 f3 (void)
35 char a[64], b[64];
36 __builtin_memset (a + 13, 2, 27);
37 __builtin_memcpy (b + 4, a + 12, 5);
38 baz (a, b);