diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b1c9e01e7b0..e884898115c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2010-11-05 Jason Merrill + + PR c++/46304 + * pt.c (tsubst_copy): Handle COMPLEX_CST. + 2010-11-04 Nicola Pero Fixed using the Objective-C 2.0 dot-syntax with class names. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index ca2baebee43..ed04b2be59e 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -11658,6 +11658,7 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl) case INTEGER_CST: case REAL_CST: case STRING_CST: + case COMPLEX_CST: { /* Instantiate any typedefs in the type. */ tree type = tsubst (TREE_TYPE (t), args, complain, in_decl); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a1fb0b11d0c..90e13ddfb1b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-11-05 Jason Merrill + + PR c++/46304 + * g++.dg/ext/complex6.C: New. + 2010-11-04 Bud Davis * gfortran.dg/intrinsic_numeric_arg.f: Add test to check diff --git a/gcc/testsuite/g++.dg/ext/complex6.C b/gcc/testsuite/g++.dg/ext/complex6.C new file mode 100644 index 00000000000..9a7c50a7ae5 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/complex6.C @@ -0,0 +1,10 @@ +// PR c++/46304 +// { dg-options "" } + +template +void f() +{ + __complex double d = 1.0 + 2.0i; +} + +template void f();