This is the mail archive of the gcc@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]

Re: g++ pointer tracking question


Does this fix the problem?

*** calls.c.~1~	Fri May 10 14:22:49 2002
--- calls.c	Sat May 18 16:07:09 2002
*************** expand_call (exp, target, ignore)
*** 3086,3092 ****
  	      rtx temp = gen_reg_rtx (GET_MODE (valreg));
  
  	      /* Mark the return value as a pointer if needed.  */
! 	      if (TREE_CODE (TREE_TYPE (exp)) == POINTER_TYPE)
  		mark_reg_pointer (temp,
  				  TYPE_ALIGN (TREE_TYPE (TREE_TYPE (exp))));
  
--- 3086,3092 ----
  	      rtx temp = gen_reg_rtx (GET_MODE (valreg));
  
  	      /* Mark the return value as a pointer if needed.  */
! 	      if (POINTER_TYPE_P (TREE_TYPE (exp)))
  		mark_reg_pointer (temp,
  				  TYPE_ALIGN (TREE_TYPE (TREE_TYPE (exp))));
  
*************** expand_call (exp, target, ignore)
*** 3118,3124 ****
  	  rtx last, insns;
  
  	  /* The return value from a malloc-like function is a pointer.  */
! 	  if (TREE_CODE (TREE_TYPE (exp)) == POINTER_TYPE)
  	    mark_reg_pointer (temp, BIGGEST_ALIGNMENT);
  
  	  emit_move_insn (temp, valreg);
--- 3118,3124 ----
  	  rtx last, insns;
  
  	  /* The return value from a malloc-like function is a pointer.  */
! 	  if (POINTER_TYPE_P (TREE_TYPE (exp)))
  	    mark_reg_pointer (temp, BIGGEST_ALIGNMENT);
  
  	  emit_move_insn (temp, valreg);
*** tree.h.~1~	Thu May 16 05:51:52 2002
--- tree.h	Sat May 18 16:06:47 2002
*************** extern void tree_class_check_failed PARA
*** 418,424 ****
     reference type.  (It should be renamed to INDIRECT_TYPE_P.)  */
  
  #define POINTER_TYPE_P(TYPE) \
!   (TREE_CODE (TYPE) == POINTER_TYPE || TREE_CODE (TYPE) == REFERENCE_TYPE)
  
  /* Nonzero if TYPE represents a bounded pointer or bounded reference type.  */
  
--- 418,426 ----
     reference type.  (It should be renamed to INDIRECT_TYPE_P.)  */
  
  #define POINTER_TYPE_P(TYPE) \
!   ((TREE_CODE (TYPE) == POINTER_TYPE \
!     && TREE_CODE (TREE_TYPE (TYPE)) != OFFSET_TYPE) \
!    || TREE_CODE (TYPE) == REFERENCE_TYPE)
  
  /* Nonzero if TYPE represents a bounded pointer or bounded reference type.  */
  

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