GIMPLE store merging pass
[official-gcc.git] / gcc / testsuite / gcc.dg / store_merging_7.c
blob4be352fef4a61d97f0e95784f5061f7fc124b937
1 /* { dg-do compile } */
2 /* { dg-require-effective-target non_strict_align } */
3 /* { dg-options "-O2 -fdump-tree-store-merging" } */
5 /* Check that we can merge consecutive array members through the pointer.
6 PR rtl-optimization/23684. */
8 void
9 foo (char *input)
11 input = __builtin_assume_aligned (input, 8);
12 input[0] = 'H';
13 input[1] = 'e';
14 input[2] = 'l';
15 input[3] = 'l';
16 input[4] = 'o';
17 input[5] = ' ';
18 input[6] = 'w';
19 input[7] = 'o';
20 input[8] = 'r';
21 input[9] = 'l';
22 input[10] = 'd';
23 input[11] = '\0';
26 /* { dg-final { scan-tree-dump-times "Merging successful" 1 "store-merging" } } */