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]

(C++) Fix for assemble_external targets


assemble_external assumes that DECL_RTL is available.  Until such time
as calls to assemble_external are deferred to expansion time, we need
to set up RTL for functions sooner.  We already do for simple
declarations.

2000-08-30  Jason Merrill  <jason@redhat.com>

	* decl.c (start_function): Always call make_function_rtl.

Index: decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.676
diff -c -p -r1.676 decl.c
*** decl.c	2000/08/28 01:16:07	1.676
--- decl.c	2000/08/30 23:26:22
*************** start_function (declspecs, declarator, a
*** 13834,13843 ****
      cplus_decl_attributes (decl1, NULL_TREE, attrs);
  
    if (!building_stmt_tree ())
!     {
!       GNU_xref_function (decl1, current_function_parms);
!       make_function_rtl (decl1);
!     }
  
    /* Promote the value to int before returning it.  */
    if (C_PROMOTING_INTEGER_TYPE_P (restype))
--- 13834,13844 ----
      cplus_decl_attributes (decl1, NULL_TREE, attrs);
  
    if (!building_stmt_tree ())
!     GNU_xref_function (decl1, current_function_parms);
! 
!   /* We need to do this even if we aren't expanding yet so that
!      assemble_external works.  */
!   make_function_rtl (decl1);
  
    /* Promote the value to int before returning it.  */
    if (C_PROMOTING_INTEGER_TYPE_P (restype))

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