1  /* { dg-do compile } */
       2  /* { dg-options "-O3 -fdump-tree-pcom-details -fdump-tree-optimized" } */
       3  
       4  int main()
       5  {
       6    volatile int y;
       7    void bar()
       8      {
       9        __builtin_printf ("%d", y);
      10      }
      11    while (y)
      12      ;
      13    return 0;
      14  }
      15  
      16  /* Make sure the load from y is correctly interpreted as volatile, even
      17     when going through FRAME.  */
      18  /* { dg-final { scan-tree-dump-not "Executing predictive commoning" "pcom" } } */
      19  /* { dg-final { scan-tree-dump " ={v} FRAME" "optimized" } } */