2015-05-04 Sandra Loosemore <sandra@codesourcery.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr52445.c
blob0977821a8292e5ae6d27b776746ca0ca0cb3bad6
1 /* PR tree-optimization/52445 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim" } */
5 void
6 foo (char *buf, unsigned long len)
8 buf[0] = '\n';
9 if (len > 1)
10 buf[1] = '\0'; /* We can't cselim "optimize" this, while
11 buf[0] doesn't trap, buf[1] could. */
14 /* { dg-final { scan-tree-dump-not "cstore\." "cselim" } } */
15 /* { dg-final { cleanup-tree-dump "cselim" } } */