| 1 |
/* PR tree-optimization/86844 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-require-effective-target store_merge } */ |
| 4 |
/* { dg-options "-O2 -fdump-tree-store-merging" } */ |
| 5 |
|
| 6 |
void |
| 7 |
foo (int *p) |
| 8 |
{ |
| 9 |
*p = 0; |
| 10 |
*((char *)p + 3) = 1; |
| 11 |
*((char *)p + 1) = 2; |
| 12 |
*((char *)p + 2) = *((char *)p + 38); |
| 13 |
} |
| 14 |
|
| 15 |
/* { dg-final { scan-tree-dump-times "Merging successful" 1 "store-merging" } } */ |
| 16 |
/* { dg-final { scan-tree-dump-times "New sequence of 1 stores to replace old one of 3 stores" 1 "store-merging" } } */ |