arm: fix typo in dg-require-effective-target [PR118089]
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / vrp9.c
blob461a2e757d2c76a62af2f34e591ab0cc1509320d
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 int some_f1 (int);
5 int some_f2 (int);
6 int some_f3 (int);
8 void remove_this_call ();
10 int g;
12 static int __attribute__((noinline))
13 bar (int p)
15 if (p)
16 remove_this_call ();
17 return g++;
20 static int __attribute__((noinline))
21 foo (int (*f)(int))
23 return bar (f == (void *)0);
26 int
27 baz1 (void)
29 int (*f)(int);
30 if (g)
31 f = some_f1;
32 else
33 f = some_f2;
34 return foo (f);
37 int
38 baz2 (void)
40 int (*f)(int);
41 if (g)
42 f = some_f2;
43 else
44 f = some_f3;
45 return foo (f);
48 /* { dg-final { scan-tree-dump-not "remove_this_call" "optimized" } } */