diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2008-05-29 16:44:29 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2008-05-29 16:44:29 +0000 |
commit | aecaad790a1111a2ad87aa03ed385981dbab7564 (patch) | |
tree | 44b5de1801b1c07d88a2f326d5b07cab892f7159 | |
parent | f2f5443c88b88d4937be5ff32950f4eb17e045d6 (diff) | |
download | gcc-aecaad790a1111a2ad87aa03ed385981dbab7564.zip gcc-aecaad790a1111a2ad87aa03ed385981dbab7564.tar.gz gcc-aecaad790a1111a2ad87aa03ed385981dbab7564.tar.bz2 |
re PR c++/35243 (ICE with invalid initializer list in variadic template)
/cp
2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/35243
* pt.c (tsubst_initializer_list): Consistently check the tree
returned by tsubst_pack_expansion for error_mark_node.
/testsuite
2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/35243
* g++.dg/cpp0x/vt-35243.C: New.
From-SVN: r136174
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/vt-35243.C | 9 |
4 files changed, 22 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f371d8c..f9b1971 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2008-05-29 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/35243 + * pt.c (tsubst_initializer_list): Consistently check the tree + returned by tsubst_pack_expansion for error_mark_node. + 2008-05-27 Michael Matz <matz@suse.de> PR c++/27975 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index b13573c..95440c9 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -15326,6 +15326,8 @@ tsubst_initializer_list (tree t, tree argvec) = tsubst_pack_expansion (expr, argvec, tf_warning_or_error, NULL_TREE); + if (expanded_exprs == error_mark_node) + continue; /* Prepend each of the expanded expressions to the corresponding TREE_LIST in EXPANDED_ARGUMENTS. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9df869d..bc5c614 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-05-29 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/35243 + * g++.dg/cpp0x/vt-35243.C: New. + 2008-05-29 H.J. Lu <hongjiu.lu@intel.com> PR target/35771 diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-35243.C b/gcc/testsuite/g++.dg/cpp0x/vt-35243.C new file mode 100644 index 0000000..4b55574 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/vt-35243.C @@ -0,0 +1,9 @@ +// { dg-options "-std=c++0x" } +struct A {}; + +template<typename... T> struct B : T... +{ + B() : T(x)... {} // { dg-error "not declared" } +}; + +B<A> b; |