[Bug middle-end/67133] [6 Regression] ICE at -Os and above on x86_64-linux-gnu in gimple_op, at gimple.h:2274
jamborm at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Aug 17 11:34:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67133
--- Comment #26 from Martin Jambor <jamborm at gcc dot gnu.org> ---
If fntype specifies the ABI then when we know we will be calling a
different function (which might have its prototype modified for
example by parameter removal), then we should set the fntype too. And
further inspection of cgraph_edge::redirect_call_stmt_to_callee also
suggests that is the correct thing. Therefore I'll bootstrap the
patch from comment #20 and propose it on the mailing list.
While the committed patch does prevent the ICE, I would actually
prefer if gimple checking failed when it encounters a direct call with
mismatching fntype. It can't happen because of this bug but I suppose
we might get wrong-code generation if we get the type only slightly
wrong.
More information about the Gcc-bugs
mailing list