Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/pr88087.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fno-code-hoisting -fdump-tree-pre-stats" } */
3
4 int f();
5 int d;
6 void c(int x)
7 {
8 int (*fp)() __attribute__((const)) = (void *)f;
9 if (x)
10 d = fp ();
11 int tem = fp ();
12 f();
13 d = tem;
14 }
15
16 /* We shouldn't ICE and PRE the const call. */
17 /* { dg-final { scan-tree-dump "Eliminated: 1" "pre" } } */