[C++ PATCH] Fix one of the recently introduced regressions

Richard Henderson rth@redhat.com
Sat Sep 13 00:25:00 GMT 2003


On Sat, Sep 13, 2003 at 02:09:51AM +0200, Steven Bosscher wrote:
> I think we shouldn't try to defer or expand function that have
> TREE_ASM_WRITTEN set... Bootstrapped and regtested c++ on
> i686-pc-linux-gnu, gives one FAIL less, 6 to go :)  OK?

I think we shouldn't have gotten here at all.  I guess I'll
have to look at this case specifically.

The -O0 constructor failures should be fixed by the following,
which Jan proposed but did not commit yesterday.


r~



Index: cgraph.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cgraph.h,v
retrieving revision 1.20
diff -c -p -d -r1.20 cgraph.h
*** cgraph.h	11 Sep 2003 07:14:01 -0000	1.20
--- cgraph.h	13 Sep 2003 00:21:13 -0000
*************** void cgraph_varpool_finalize_decl (tree)
*** 168,173 ****
--- 168,174 ----
  bool cgraph_varpool_assemble_pending_decls (void);
  
  /* In cgraphunit.c  */
+ bool cgraph_assemble_pending_functions (void);
  void cgraph_finalize_function (tree, bool);
  void cgraph_finalize_compilation_unit (void);
  void cgraph_create_edges (tree, tree);
Index: cgraphunit.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cgraphunit.c,v
retrieving revision 1.29
diff -c -p -d -r1.29 cgraphunit.c
*** cgraphunit.c	11 Sep 2003 07:14:01 -0000	1.29
--- cgraphunit.c	13 Sep 2003 00:21:13 -0000
*************** decide_is_function_needed (struct cgraph
*** 122,128 ****
  
  /* When not doing unit-at-a-time, output all functions enqueued.
     Return true when such a functions were found.  */
! static bool
  cgraph_assemble_pending_functions (void)
  {
    bool output = false;
--- 122,129 ----
  
  /* When not doing unit-at-a-time, output all functions enqueued.
     Return true when such a functions were found.  */
! 
! bool
  cgraph_assemble_pending_functions (void)
  {
    bool output = false;
*************** cgraph_assemble_pending_functions (void)
*** 136,144 ****
  
        cgraph_nodes_queue = cgraph_nodes_queue->next_needed;
        if (!n->origin && !DECL_EXTERNAL (n->decl))
! 	cgraph_expand_function (n);
!       output = true;
      }
    return output;
  }
  
--- 137,148 ----
  
        cgraph_nodes_queue = cgraph_nodes_queue->next_needed;
        if (!n->origin && !DECL_EXTERNAL (n->decl))
! 	{
! 	  cgraph_expand_function (n);
! 	  output = true;
! 	}
      }
+ 
    return output;
  }
  
Index: cp/decl2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl2.c,v
retrieving revision 1.676
diff -c -p -d -r1.676 decl2.c
*** cp/decl2.c	11 Sep 2003 20:47:13 -0000	1.676
--- cp/decl2.c	13 Sep 2003 00:21:15 -0000
*************** finish_file ()
*** 2863,2868 ****
--- 2863,2871 ----
  	  && wrapup_global_declarations (&VARRAY_TREE (pending_statics, 0),
  					 pending_statics_used))
  	reconsider = true;
+ 
+       if (cgraph_assemble_pending_functions ())
+ 	reconsider = true;
      } 
    while (reconsider);
  



More information about the Gcc-patches mailing list