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

[Bug middle-end/16237] [3.5 Regression] ICE caused by Kenner's big untested (regression causing) patch


------- Additional Comments From kenner at vlsi1 dot ultra dot nyu dot edu  2004-07-20 01:28 -------
Subject: Re:   [3.5 Regression] ICE caused by Kenner's big untested (regression causing) patch

    Would you attach the patch to the PR?  I can't find it in gcc-patches.

I'll put it here.  It was on the GCC list itself, not gcc-patches.

*** 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:


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16237


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