Compile the following at -Os:
typedef void (*Foo)(void*);
void Bar(void* FunctionPtr)
{
((Foo)FunctionPtr)((void*)Bar);
}
int main(int argc, char *argv[]) {
Bar((void*)Bar);
}The inliner will recurse infinitely because it doesn't handle the case where a function takes a function pointer argument, and is called using a pointer to itself as an argument. This patch makes the inliner quit when the examined callsite involves a function pointer parameter.
typo in the help text.