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]

[applied] fix c++ pch errors on mips-elf


This patch fixes the c++ pch errors on mips-elf. Tested on mips-elf
bootstrapped on irix 6.5.

-eric

-- 
Eric Christopher <echristo@redhat.com>

2003-05-29  Eric Christopher  <echristo@redhat.com>

	* config/mips/mips.c (extern_list): Add GTY marker.
	(extern_head): Separate out definition. Add marker.
	(mips_output_external): Use ggc_alloc for extern_list
	allocation.
	(mips_output_external_libcall): Ditto.

? mips.c.encode
Index: mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.267
diff -u -p -w -r1.267 mips.c
--- mips.c	19 May 2003 07:36:27 -0000	1.267
+++ mips.c	30 May 2003 05:23:55 -0000
@@ -458,12 +458,14 @@ FILE *asm_out_text_file;
    for the global pointer if they haven't been declared by the end of
    the program with an appropriate .comm or initialization.  */
 
-struct extern_list
+struct extern_list GTY (())
 {
   struct extern_list *next;	/* next external */
   const char *name;		/* name of the external */
   int size;			/* size in bytes */
-} *extern_head = 0;
+};
+
+static GTY (()) struct extern_list *extern_head = 0;
 
 /* Name of the file containing the current function.  */
 const char *current_function_file = "";
@@ -6253,7 +6255,7 @@ mips_output_external (file, decl, name)
 	  || strcmp (TREE_STRING_POINTER (section_name), ".sbss") == 0
 	  || strcmp (TREE_STRING_POINTER (section_name), ".sdata") == 0))
     {
-      p = (struct extern_list *) xmalloc (sizeof (struct extern_list));
+      p = (struct extern_list *) ggc_alloc (sizeof (struct
extern_list));
       p->next = extern_head;
       p->name = name;
       p->size = len;
@@ -6269,7 +6271,7 @@ mips_output_external (file, decl, name)
 	 bootstrap under Irix 5.1.  */
       && strcmp (name, "__builtin_next_arg"))
     {
-      p = (struct extern_list *) xmalloc (sizeof (struct extern_list));
+      p = (struct extern_list *) ggc_alloc (sizeof (struct
extern_list));
       p->next = extern_head;
       p->name = name;
       p->size = -1;
@@ -6288,7 +6290,7 @@ mips_output_external_libcall (file, name
 {
   register struct extern_list *p;
 
-  p = (struct extern_list *) xmalloc (sizeof (struct extern_list));
+  p = (struct extern_list *) ggc_alloc (sizeof (struct extern_list));
   p->next = extern_head;
   p->name = name;
   p->size = -1;




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