re PR c++/35325 (ICE with fixed-point types in template parameter)

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

From-SVN: r134519
This commit is contained in:
Jason Merrill 2008-04-21 13:58:53 -04:00 committed by Jason Merrill
parent 3d4cb550a7
commit d05739f8c4
4 changed files with 17 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2008-04-21 Jason Merrill <jason@redhat.com>
PR c++/35325
* tree.c (cp_tree_equal): Handle FIXED_CST.
PR c++/35678
* pt.c (template_template_parm_bindings_ok_p): Set
processing_template_decl while in this function.

View File

@ -1734,6 +1734,10 @@ cp_tree_equal (tree t1, tree t2)
&& !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));

View File

@ -1,5 +1,8 @@
2008-04-21 Jason Merrill <jason@redhat.com>
PR c++/35325
* g++.dg/ext/fixed1.C: New.
PR c++/35678
* g++.dg/template/ttp27.C: New.

View File

@ -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)> {};