This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Small fix for ggc-simple.c
- To: gcc-patches at gcc dot gnu dot org
- Subject: Small fix for ggc-simple.c
- From: Bernd Schmidt <bernds at cygnus dot co dot uk>
- Date: Thu, 7 Oct 1999 20:29:54 +0100 (BST)
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);
}