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]

[patch] expr.h: Fix the declaration of block_clear_fn.


Hi,

Attached is a patch to fix the declaration of block_clear_fn.

Whiel building glibc, the compiler triggered a segfault.  It turns out
that block_clear_fn is not mentioned in gtype-desc.c, allowing the
garbage collector to collect what block_clear_fn is pointing to.

The patch fixes the problem by adding expr.h to GTFILES.

Tested by building i686-pc-linux-gnu.  Committed as obvious.

Kazu Hirata

2008-12-24  Kazu Hirata  <kazu@codesourcery.com>

	* Makefile.in (GTFILES): Add $(srcdir)/expr.h.
	* expr.h: Fix the declaration of block_clear_fn.

Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in	(revision 142913)
+++ gcc/Makefile.in	(working copy)
@@ -3304,6 +3304,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/inp
   $(srcdir)/tree-vect-generic.c \
   $(srcdir)/dojump.c \
   $(srcdir)/emit-rtl.c $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \
+  $(srcdir)/expr.h \
   $(srcdir)/function.c $(srcdir)/except.h \
   $(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \
   $(srcdir)/profile.c $(srcdir)/regclass.c $(srcdir)/mcf.c \
Index: gcc/expr.h
===================================================================
--- gcc/expr.h	(revision 142913)
+++ gcc/expr.h	(working copy)
@@ -404,7 +404,7 @@ enum block_op_methods
   BLOCK_OP_TAILCALL
 };
 
-extern tree GTY(()) block_clear_fn;
+extern GTY(()) tree block_clear_fn;
 extern void init_block_move_fn (const char *);
 extern void init_block_clear_fn (const char *);
 


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