The following code snippet triggers an ICE on mainline: =========================================== struct A {}; template<typename... T> struct B : T... { B() : T()... {} }; B<A> b; =========================================== bug.cc: In constructor 'B<T>::B() [with T = A]': bug.cc:8: instantiated from here bug.cc:5: internal compiler error: tree check: expected tree_list, have void_type in tsubst_initializer_list, at cp/pt.c:14981 Please submit a full bug report, [etc.] I guess, the code is invalid, but I'm not sure.
How can this be a regression? Support variadic templates did not exist in previous releases.
> How can this be a regression? Support variadic templates did not exist in > previous releases. The C++ frontend shouldn't crash with any input, even with line-noise. It didn't crash with this input in previous releases, but now it crashes (even without the "-std=gnu++0x" switch). That's a regression.
Confirmed.
Mark, this is really only an error recovery regression. Can you relook at the current priority? Thanks, Andrew Pinski t1.cc:4: error: ISO C++ does not include variadic templates t1.cc: In constructor 'B<T>::B() [with T = A]': t1.cc:9: instantiated from here t1.cc:6: internal compiler error: tree check: expected tree_list, have void_type in tsubst_initializer_list, at cp/pt.c:15017 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
This is an ice-on-valid, so it should probably be a P2.
(In reply to comment #5) > This is an ice-on-valid, so it should probably be a P2. Well it is both depending on -std= settings.
I agree that this should be a P2. I had misunderstood Andrew's earlier comment to mean that we always got a valid error message before the ICE.
The ice-on-valid is not a regression though (it only happens with -std=c++0x which is new). P4 again.
Patch at http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00520.html
This patch is OK.
Subject: Bug 34050 Author: dgregor Date: Fri Feb 15 03:09:18 2008 New Revision: 132331 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132331 Log: 2008-02-14 Douglas Gregor <doug.gregor@gmail.com> PR c++/34050 * pt.c (tsubst_initializer_list): Deal with the use of VOID_TYPE_NODE to indicate value-initialization of the bases. 2008-02-14 Douglas Gregor <doug.gregor@gmail.com> PR c++/34050 * g++.dg/cpp0x/vt-34050.C: New. Added: trunk/gcc/testsuite/g++.dg/cpp0x/vt-34050.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog
Thanks, Mark! Fixed on mainline.