c++: constantness of call to function pointer [PR111703]
[official-gcc.git] / gcc / testsuite / g++.dg / pr104992-1.C
blob02b288216feaac2898d17aeeb6d46667f8011f59
1 /* PR tree-optimization/104992 */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -Wno-psabi" } */
5 #include "../gcc.dg/pr104992.c"
7 int main () {
9     /* Should be true.  */
10     if (!foo(6, 3)
11         || !bar(12, 2)
12         || !baz(34, 17)
13         || !qux(50, 10)
14         || !fred(16, 8)
15         || !baz(-9, 3)
16         || !baz(9, -3)
17         || !baz(-9, -3)
18         ) {
19             __builtin_abort();
20          }
21     
22     /* Should be false.  */
23     if (foo(5, 30)
24         || bar(72, 27)
25         || baz(42, 15)) {
26             __builtin_abort();
27         }
28     
29     return 0;