summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr52445.c
blob: 6ab316bc1fb5c0730db8db868f442325ebd3e1e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* PR tree-optimization/52445 */
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim" } */

void
foo (char *buf, unsigned long len)
{
  buf[0] = '\n';
  if (len > 1)
    buf[1] = '\0';	/* We can't cselim "optimize" this, while
			   buf[0] doesn't trap, buf[1] could.  */
}

/* { dg-final { scan-tree-dump-not "cstore\." "cselim" } } */