gold/testsuite/icf_test.cc:32:5: error: infinite recursion detected [-Werror=infinite-recursion]
32 | int kept_func()
| ^~~~~~~~~
* testsuite/icf_test.cc: Avoid infinite recursion error.
return 1;
}
-int kept_func()
+int kept_func(int i)
{
common();
// Recursive call.
- kept_func();
+ if (i)
+ kept_func(i - 1);
return 1;
}
-int folded_func()
+int folded_func(int i)
{
common();
// Recursive call.
- folded_func();
+ if (i)
+ folded_func(i - 1);
return 1;
}