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] Var-tracking breaks garbage collection


Hello,

var-tracking support has introduced a global tree variable that is
not tracked by GC.  The contents of frame_base_decl can be clobbered
by the garbage collector, which causes a bootstrap failure on s390
and s390x.

Fixed by adding GTY markers.

Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux.
OK?

ChangeLog:

	* tree.h (frame_base_decl): Add GTY marker.
	* var-tracking.c (frame_base_decl): Likewise.


Index: gcc/tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.464
diff -c -p -r1.464 tree.h
*** gcc/tree.h	8 Feb 2004 01:59:03 -0000	1.464
--- gcc/tree.h	10 Feb 2004 19:07:28 -0000
*************** enum ptrmemfunc_vbit_where_t
*** 2053,2059 ****
  
  #define NULL_TREE (tree) NULL
  
! extern tree frame_base_decl;
  extern tree decl_assembler_name (tree);
  
  /* Compute the number of bytes occupied by 'node'.  This routine only
--- 2053,2059 ----
  
  #define NULL_TREE (tree) NULL
  
! extern GTY(()) tree frame_base_decl;
  extern tree decl_assembler_name (tree);
  
  /* Compute the number of bytes occupied by 'node'.  This routine only
Index: gcc/var-tracking.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/var-tracking.c,v
retrieving revision 2.3
diff -c -p -r2.3 var-tracking.c
*** gcc/var-tracking.c	7 Feb 2004 15:56:53 -0000	2.3
--- gcc/var-tracking.c	10 Feb 2004 19:07:30 -0000
*************** static htab_t changed_variables;
*** 262,268 ****
  static bool emit_notes;
  
  /* Fake variable for stack pointer.  */
! tree frame_base_decl;
  
  /* Local function prototypes.  */
  static void stack_adjust_offset_pre_post (rtx, HOST_WIDE_INT *,
--- 262,268 ----
  static bool emit_notes;
  
  /* Fake variable for stack pointer.  */
! GTY(()) tree frame_base_decl;
  
  /* Local function prototypes.  */
  static void stack_adjust_offset_pre_post (rtx, HOST_WIDE_INT *,

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


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