https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84739
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 43582 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43582&action=edit gcc8-pr84739.patch Untested fix. With different gimple_call_fntype the ICE doesn't reproduce, because if there is a mismatch between func's DECL_ARGUMENTS and the actual arguments, the current code already rejects it as tail recursion. In the past, there used to be if (func == current_function_decl) condition and so what we picked DECL_ARGUMENTS from didn't really matter, but now with the recursive_call_p check it does.