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]

Small fix for ggc-simple.c


I've committed this obvious bugfix.  empty_string wasn't initialized by
ggc-simple.c, causing null pointers to appear in asm_operands rtx's and
segmentation faults when trying to strcmp those null pointers.

Bernd

+	* ggc-simple.c (init_ggc): Set empty_string.

Index: ggc-simple.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/ggc-simple.c,v
retrieving revision 1.4
diff -u -p -r1.4 ggc-simple.c
--- ggc-simple.c	1999/10/05 15:45:31	1.4
+++ ggc-simple.c	1999/10/07 18:19:10
@@ -148,7 +148,7 @@ init_ggc PROTO ((void))
   setlinebuf (dump);
 #endif
 
-  ggc_alloc_string ("", 0);
+  empty_string = ggc_alloc_string ("", 0);
   ggc_add_string_root (&empty_string, 1);
 }
 


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