This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/67133] [6 Regression] ICE at -Os and above on x86_64-linux-gnu in gimple_op, at gimple.h:2274
- From: "jamborm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Aug 2015 11:34:16 +0000
- Subject: [Bug middle-end/67133] [6 Regression] ICE at -Os and above on x86_64-linux-gnu in gimple_op, at gimple.h:2274
- Auto-submitted: auto-generated
- References: <bug-67133-4 at http dot gcc dot gnu dot org/bugzilla/>
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.