[PATCH] Fix gimple-fold
Martin Liška
mliska@suse.cz
Tue Mar 18 12:53:00 GMT 2014
Hello,
I found ICE in Chromium compiled with LTO. There's a call that is
proved by ipa-devirt as __builtin_unreachable; same decision is done by
gimple-fold and this call is replaced by GIMPLE_CALL and GIMPLE_ASSIGN
(in this order). After that condition for
cgraph_update_edges_for_call_stmt_node is not satisfied and
corresponding cgraph_edge is not updated. Thus a verifier reports a
wrong edge.
Bootstrapped and tested on a x86_64 machine.
Changelog:
2014-03-18 Martin Liska <mliska@suse.cz>
* cgraph.c (cgraph_update_edges_for_call_stmt_node): added case when
gimple call statement is updated.
* gimple-fold.c (gimple_fold_call): changed order for GIMPLE_ASSIGN and
GIMPLE_CALL, where gsi iterator still points to GIMPLE CALL.
OK for trunk?
Thank you,
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-fold-devirt.patch
Type: text/x-patch
Size: 1456 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140318/afe624ff/attachment.bin>
More information about the Gcc-patches
mailing list