From: Jason Merrill Date: Mon, 21 Apr 2008 17:58:53 +0000 (-0400) Subject: re PR c++/35325 (ICE with fixed-point types in template parameter) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d05739f8c4cb1eb3e10170d08391c01fdfe2aa35;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 09b2e08f0a5..1ea37333236 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2008-04-21 Jason Merrill + 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. diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 73adbb50725..ff372206ee6 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -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)); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dca56d962bb..64416f4068f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2008-04-21 Jason Merrill + PR c++/35325 + * g++.dg/ext/fixed1.C: New. + PR c++/35678 * g++.dg/template/ttp27.C: New. diff --git a/gcc/testsuite/g++.dg/ext/fixed1.C b/gcc/testsuite/g++.dg/ext/fixed1.C new file mode 100644 index 00000000000..db074a35b0c --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/fixed1.C @@ -0,0 +1,7 @@ +// PR c++/35325 + +template struct A {}; + +template struct B : A {}; + +template struct C : A {};