summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr56098-1.c
blob: c3b081a0899ccdb98f71863ca7ffe20ef4d54fed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* PR tree-optimization/56098 */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

volatile int *p;

void
foo (int x)
{
  *p = 1;
  if (x)
    *p = 2;
}

/* { dg-final { scan-tree-dump-not "=\[^\n\r]*\\*p" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */