libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr86017.c
blobc7ef73ad59e464a4a66f378eaa146ada982ebead
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fno-tree-vectorize -fdump-tree-store-merging" } */
4 void f (void*);
6 void g (void)
8 char a[8];
9 __builtin_memset (a, 0, 8);
11 f (a);
14 void h (void)
16 char a[8];
17 __builtin_memset (a, 0, 1);
18 __builtin_memset (a + 1, 0, 1);
19 __builtin_memset (a + 2, 0, 1);
20 __builtin_memset (a + 3, 0, 1);
21 __builtin_memset (a + 4, 0, 1);
22 __builtin_memset (a + 5, 0, 1);
23 __builtin_memset (a + 6, 0, 1);
24 __builtin_memset (a + 7, 0, 1);
26 f (a);
29 /* { dg-final { scan-tree-dump "Merged into 1 stores" "store-merging" } } */