aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorSimon Martin <simartin@users.sourceforge.net>2007-03-04 19:50:54 +0000
committerSimon Martin <simartin@gcc.gnu.org>2007-03-04 19:50:54 +0000
commit2a2193e029fd71ac7962f5cba542e0565c285e6f (patch)
tree981594d884c68c44b2891e4dea8293bb08740dde /gcc/cp/tree.c
parent270d43bf1ef449e769758eed4fd3c8e02ddac1ec (diff)
downloadgcc-2a2193e029fd71ac7962f5cba542e0565c285e6f.zip
gcc-2a2193e029fd71ac7962f5cba542e0565c285e6f.tar.gz
gcc-2a2193e029fd71ac7962f5cba542e0565c285e6f.tar.bz2
re PR c++/30895 (ICE with complex values in template parameter)
2007-03-04 Simon Martin <simartin@users.sourceforge.net> PR c++/30895 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees. From-SVN: r122532
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index a5fac29..b7e1d0f 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1670,6 +1670,10 @@ cp_tree_equal (tree t1, tree t2)
&& !memcmp (TREE_STRING_POINTER (t1), TREE_STRING_POINTER (t2),
TREE_STRING_LENGTH (t1));
+ case COMPLEX_CST:
+ return cp_tree_equal (TREE_REALPART (t1), TREE_REALPART (t2))
+ && cp_tree_equal (TREE_IMAGPART (t1), TREE_IMAGPART (t2));
+
case CONSTRUCTOR:
/* We need to do this when determining whether or not two
non-type pointer to member function template arguments