This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][LTO] "Fix" PR41502
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Diego Novillo <dnovillo at google dot com>
- Date: Tue, 29 Sep 2009 16:14:59 +0200 (CEST)
- Subject: [PATCH][LTO] "Fix" PR41502
This partially reverts
http://gcc.gnu.org/ml/gcc-patches/2008-11/msg00883.html which is
breaking gcc.dg/attr-warn-unused-result.c.
The lto problem is still there - building the testcase with -flto
will ICE in the same way, but at least without -flto the regression
is gone.
We have to think about extern inline functions again, but also see
the other thread with honza.
Richard.
2009-09-29 Richard Guenther <rguenther@suse.de>
PR middle-end/41502
* cgraphunit.c (ipa_passes): Do not remove bodies of extern
inline functions if not generating lto output.
Index: gcc/cgraphunit.c
===================================================================
*** gcc/cgraphunit.c (revision 152269)
--- gcc/cgraphunit.c (working copy)
*************** ipa_passes (void)
*** 1362,1370 ****
if (cgraph_state < CGRAPH_STATE_IPA_SSA)
cgraph_state = CGRAPH_STATE_IPA_SSA;
! /* Remove the bodies of extern inline functions that we never
! inlined. */
! cgraph_remove_unreachable_nodes (false, dump_file);
if (!in_lto_p)
{
--- 1362,1374 ----
if (cgraph_state < CGRAPH_STATE_IPA_SSA)
cgraph_state = CGRAPH_STATE_IPA_SSA;
! /* FIXME lto. Remove the bodies of extern inline functions that we never
! inlined. Otherwise, during WPA extern inline functions generate duplicate
! cgraph nodes for the same function which conflict with each other
! and with the cgraph node for the offline version.
! But this is really too early - see PR41502. */
! if (flag_generate_lto)
! cgraph_remove_unreachable_nodes (false, dump_file);
if (!in_lto_p)
{