This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix -fwhole-program on LTO


> > On Wed, 7 Oct 2009, Jan Hubicka wrote:
> > 
> > > > 
> > > > Btw, compared to before your patch we now have (compile & link status
> > > > is the same):
> > > > 
> > > > CINT2006
> > > > 400.perlbench      --      0.242            RE
> > > > 403.gcc            --      0.008            RE
> > > > 445.gobmk          --      0.373            RE
> > > > 471.omnetpp        --      0.243            RE
> > > > 473.astar          --      9.39             VE
> > > 
> > > It looks like one of the new sanity checks is firing, or we really do
> > > have segfaults now?
> > > I will try to reproduce it. This is with -O3 -flto -fwhole-program?
> > 
> > These are not ICEs but the programs segfault.  It's fixed with
> > -fno-ipa-sra, so that is to blame.  I'm re-running with it disabled
> > to double-check.
> 
> I am testing patch fixing the ipa-sra issue.

and commited after x86_64-linux testing.

Index: cgraph.c
===================================================================
--- cgraph.c	(revision 152531)
+++ cgraph.c	(working copy)
@@ -1983,7 +1983,8 @@ cgraph_add_new_function (tree fndecl, bo
 bool
 cgraph_node_can_be_local_p (struct cgraph_node *node)
 {
-  return !node->needed;
+  return (!node->needed
+  	  && (DECL_COMDAT (node->decl) || !node->local.externally_visible));
 }
 
 /* Bring NODE local.  */
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 152531)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2009-10-06  Jan Hubicka  <jh@suse.cz>
+
+	* cgraph.c (cgraph_node_can_be_local): Handle externally visible nodes
+	correctly.
+
 2009-10-06  Uros Bizjak  <ubizjak@gmail.com>
 
 	* config/i386/i386.md (*lea_1_rex64, *lea_1, *lea_1_zext,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]