(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
tree-ssa/
pr22051-2.c
       1  /* { dg-do compile }  */
       2  /* { dg-options "-O2 -fdump-tree-optimized -w" }  */
       3  
       4  void *arf ();
       5  int
       6  foo(void (*q)(void))
       7  {
       8    int r = q;
       9  
      10    if (r != 0)
      11      return 1;
      12    else
      13      return 2;
      14  }
      15  
      16  /* The cast to an int type must remain after all optimizations are complete
      17     so that we do not try to canonicalize a function pointer for the
      18     comparison when no such canonicalization is wanted.  */
      19  /* { dg-final { scan-tree-dump-times "r_. = \\(int\\) q" 1 "optimized" } } */
      20