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: Failure to bootstrap for trunk on i686-pc-linux-gnu


    Maybe you should post it so that I can give it a try and verify that
    it does, in fact, fix this problem?  Other people are having a hard
    time reproducing the failure; I'd like to not assume that an unseen
    and unreviewed patch will make it all better.

I thought it was quite well understood that the issue was incomplete
comparisons in operand_equal_p, but perhaps indeed it is another issue.

This is the obvious fix for the comparison problem:

*** fold-const.c	8 Jul 2004 17:40:22 -0000	1.421
--- fold-const.c	12 Jul 2004 14:39:08 -0000
*************** int
*** 2348,2353 ****
  operand_equal_p (tree arg0, tree arg1, unsigned int flags)
  {
    /* If either is ERROR_MARK, they aren't equal.  */
!   if (TREE_CODE (arg0) == ERROR_MARK || TREE_CODE (arg1) == ERROR_MARK)
      return 0;
  
--- 2348,2359 ----
  operand_equal_p (tree arg0, tree arg1, unsigned int flags)
  {
+   /* If one is specified and the other isn't, they aren't equal and if
+      neither is specified, they are.  */
+   if ((arg0 && !arg1) || (!arg0 && arg1))
+     return 0;
+   else if (!arg0 && !arg1)
+     return 1;
    /* If either is ERROR_MARK, they aren't equal.  */
!   else if (TREE_CODE (arg0) == ERROR_MARK || TREE_CODE (arg1) == ERROR_MARK)
      return 0;
  
*************** operand_equal_p (tree arg0, tree arg1, u
*** 2483,2487 ****
  				  TREE_OPERAND (arg1, 0), flags);
  
- 	case COMPONENT_REF:
  	case ARRAY_REF:
  	case ARRAY_RANGE_REF:
--- 2489,2492 ----
*************** operand_equal_p (tree arg0, tree arg1, u
*** 2489,2493 ****
  				   TREE_OPERAND (arg1, 0), flags)
  		  && operand_equal_p (TREE_OPERAND (arg0, 1),
! 				      TREE_OPERAND (arg1, 1), flags));
  
  	case BIT_FIELD_REF:
--- 2494,2512 ----
  				   TREE_OPERAND (arg1, 0), flags)
  		  && operand_equal_p (TREE_OPERAND (arg0, 1),
! 				      TREE_OPERAND (arg1, 1), flags)
! 		  && operand_equal_p (TREE_OPERAND (arg0, 2),
! 				      TREE_OPERAND (arg1, 2), flags)
! 		  && operand_equal_p (TREE_OPERAND (arg0, 3),
! 				      TREE_OPERAND (arg1, 3), flags));
! 
! 
! 	case COMPONENT_REF:
! 	  return (operand_equal_p (TREE_OPERAND (arg0, 0),
! 				   TREE_OPERAND (arg1, 0), flags)
! 		  && operand_equal_p (TREE_OPERAND (arg0, 1),
! 				      TREE_OPERAND (arg1, 1), flags)
! 		  && operand_equal_p (TREE_OPERAND (arg0, 2),
! 				      TREE_OPERAND (arg1, 2), flags));
! 
  
  	case BIT_FIELD_REF:


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