Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr22051-2.c
bloba6b7099d6341157b96f2c152834d6d66b1ee3f1e
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized -w" } */
7 void *arf ();
8 int
9 foo()
11 void (*q)(void);
12 int r = q;
14 if (r != 0)
15 return 1;
16 else
17 return 2;
20 /* The cast to an int type must remain after all optimizations are complete
21 so that we do not try to canonicalize a function pointer for the
22 comparison when no such canonicalization is wanted. */
23 /* { dg-final { scan-tree-dump-times "if \\(\\(int\\).*q" 1 "optimized" } } */
24 /* { dg-final { cleanup-tree-dump "optimized" } } */