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]

C++ PATCH to c++/35325


Just needed to copy FIXED_CST handling from operand_equal_p.

Tested x86_64-pc-linux-gnu, applied to trunk and 4.3.
2008-04-21  Jason Merrill  <jason@redhat.com>

	PR c++/35325
	* tree.c (cp_tree_equal): Handle FIXED_CST.

Index: cp/tree.c
===================================================================
*** cp/tree.c	(revision 134514)
--- cp/tree.c	(working copy)
*************** cp_tree_equal (tree t1, tree t2)
*** 1734,1739 ****
--- 1734,1743 ----
  	&& !memcmp (TREE_STRING_POINTER (t1), TREE_STRING_POINTER (t2),
  		    TREE_STRING_LENGTH (t1));
  
+     case FIXED_CST:
+       return FIXED_VALUES_IDENTICAL (TREE_FIXED_CST (t1),
+ 				     TREE_FIXED_CST (t2));
+ 
      case COMPLEX_CST:
        return cp_tree_equal (TREE_REALPART (t1), TREE_REALPART (t2))
  	&& cp_tree_equal (TREE_IMAGPART (t1), TREE_IMAGPART (t2));
Index: testsuite/g++.dg/ext/fixed1.C
===================================================================
*** testsuite/g++.dg/ext/fixed1.C	(revision 0)
--- testsuite/g++.dg/ext/fixed1.C	(revision 0)
***************
*** 0 ****
--- 1,7 ----
+ // PR c++/35325
+ 
+ template<int> struct A {};
+ 
+ template<typename> struct B : A<sizeof(0=0r)> {};
+ 
+ template<typename> struct C : A<sizeof(0=0r)> {};

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