1/* PR tree-optimization/52445 */
2/* { dg-do compile } */
3/* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim" } */
4
5void
6foo (char *buf, unsigned long len)
7{
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.  */
12}
13
14/* { dg-final { scan-tree-dump-not "cstore\." "cselim" } } */
15/* { dg-final { cleanup-tree-dump "cselim" } } */
16