http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46046
Summary: internal compiler error with SFINAE expression in a template inside a template Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: g...@r9e.de Created attachment 22061 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22061 Sample code to trigger the segfault When compiling the given sample code g++ produces the following error message: # g++ sample.cpp sample.cpp: In function ‘int main()’: sample.cpp:23:22: internal compiler error: tree check: expected tree_vec, have error_mark in add_to_template_args, at cp/pt.c:496 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. I'm not absolutely sure if it is valid c++, but even if it is not, the compiler should not produce this error I have reproduced this with gcc 4.5.1 and trunk compiled on a Ubuntu 10.04 amd64 and configured using: CFLAGS="-m64 -g -O2" ../gcc-trunk/configure --enable-languages=c,c++ --disable-multilib gcc 4.5.1 did not print the error message above, but segfaulted: # g++ sample.cpp sample.cpp: In function ‘int main()’: sample.cpp:23:22: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. The gcc 4.4.3 distributed by Ubuntu segfaulted, too, but I did not compile a vanilla gcc 4.4.