re PR target/47333 (g++.dg/lto/20091219 FAILs on Solaris 2 with SUN as)
authorJakub Jelinek <jakub@redhat.com>
Fri, 6 Jan 2012 22:06:08 +0000 (23:06 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 6 Jan 2012 22:06:08 +0000 (23:06 +0100)
PR target/47333
* cgraphunit.c (cgraph_optimize): Call output_weakrefs
before emitting functions.

From-SVN: r182974

gcc/ChangeLog
gcc/cgraphunit.c

index 9cf3dbc35283d4e4db7bbcc49de1737a12fcdb36..6186612a41581a3547622551497eb1c06503051e 100644 (file)
@@ -1,5 +1,9 @@
 2012-01-06  Jakub Jelinek  <jakub@redhat.com>
 
+       PR target/47333
+       * cgraphunit.c (cgraph_optimize): Call output_weakrefs
+       before emitting functions.
+
        PR gcov-profile/50127
        * bb-reorder.c (partition_hot_cold_basic_blocks): Call
        clear_aux_for_blocks.
index 886a2def0e56b408548d1f97a0d3e8693207b2a5..2c9c8ddca5a6394a6e840598548bf169cf62adf3 100644 (file)
@@ -1,6 +1,6 @@
 /* Callgraph based interprocedural optimizations.
    Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-   2011 Free Software Foundation, Inc.
+   2011, 2012 Free Software Foundation, Inc.
    Contributed by Jan Hubicka
 
 This file is part of GCC.
@@ -2187,6 +2187,7 @@ cgraph_optimize (void)
 #endif
   bitmap_obstack_release (NULL);
   cgraph_mark_functions_to_output ();
+  output_weakrefs ();
 
   cgraph_state = CGRAPH_STATE_EXPANSION;
   if (!flag_toplevel_reorder)
@@ -2201,7 +2202,6 @@ cgraph_optimize (void)
       varpool_assemble_pending_decls ();
     }
 
-  output_weakrefs ();
   cgraph_process_new_functions ();
   cgraph_state = CGRAPH_STATE_FINISHED;