1 /* { dg-do compile } */ 2 /* { dg-require-effective-target store_merge } */ 3 /* { dg-options "-O2 -fdump-tree-store-merging" } */ 4 5 /* Check that we can merge consecutive array members through the pointer. 6 PR rtl-optimization/23684. */ 7 8 void foo(char * input)9foo (char *input) 10 { 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'; 24 } 25 26 /* { dg-final { scan-tree-dump-times "Merging successful" 1 "store-merging" } } */ 27