aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr101824.c
blob: d5987e14360cf7fa8eb195c2ca00b167a0e9eb1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-options "-O3 -fdump-tree-pcom-details -fdump-tree-optimized" } */

int main()
{
  volatile int y;
  void bar()
    {
      __builtin_printf ("%d", y);
    }
  while (y)
    ;
  return 0;
}

/* Make sure the load from y is correctly interpreted as volatile, even
   when going through FRAME.  */
/* { dg-final { scan-tree-dump-not "Executing predictive commoning" "pcom" } } */
/* { dg-final { scan-tree-dump " ={v} FRAME" "optimized" } } */