C99 testsuite readiness: -fpermissive tests
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr22051-2.c
blob11a805990ef5ddaf020015729f18db1246355da0
1 /* { dg-do compile } */
2 /* { dg-options "-fpermissive -O2 -fdump-tree-optimized -w" } */
4 void *arf ();
5 int
6 foo(void (*q)(void))
8 int r = q;
10 if (r != 0)
11 return 1;
12 else
13 return 2;
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" } } */