Attached broken code causes gcc to crash after giving diagnostics. Command line: g++ testcase.ii (no switch is needed)
Tested versions: trunk r155020 - crash trunk r153685 - crash 4.4 r154975 - crash (with enabled checking) trunk r154886 - OK (disabled checking) 4.4 r154724 - OK (disabled checking) Output (with checking enabled): $ /mnt/svn/gcc-4_4/binary-154975-enable-checking/bin/g++ testcase-manual.ii -o tmp.o -c testcase-manual.ii:2: error: ‘size_t’ has not been declared testcase-manual.ii:10: error: ‘iterator_traits’ is not a template testcase-manual.ii:16: error: ‘allocator’ is not a template testcase-manual.ii:17: error: expected unqualified-id before ‘namespace’ testcase-manual.ii:21: error: ‘__gnu_cxx::allocator’ is not a template ... testcase-manual.ii:71: instantiated from ‘int __gnu_cxx::__gnu_cxx::__to_xstring(int (*)(_CharT*, int, const _CharT*, __va_list_tag*), int, const _CharT*, ...) [with _String = __gnu_cxx::std::basic_string<char, __gnu_cxx::std::char_traits<char>, __gnu_cxx::allocator>, _CharT = char]’ testcase-manual.ii:77: instantiated from here testcase-manual.ii:41: internal compiler error: in instantiate_decl, at cp/pt.c:15451 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Output (with checking disabled): $ /mnt/svn/gcc-4_4/binary-154724/bin/g++ testcase-manual.ii -o tmp.o -c testcase-manual.ii:2: error: ‘size_t’ has not been declared testcase-manual.ii:10: error: ‘iterator_traits’ is not a template testcase-manual.ii:16: error: ‘allocator’ is not a template testcase-manual.ii:17: error: expected unqualified-id before ‘namespace’ testcase-manual.ii:21: error: ‘__gnu_cxx::allocator’ is not a template ... testcase-manual.ii:77: instantiated from here testcase-manual.ii:50: error: invalid conversion from ‘char*’ to ‘int’ testcase-manual.ii:41: confused by earlier errors, bailing out -- Summary: internal compiler error: in instantiate_decl (with checking enabled) Product: gcc Version: 4.4.3 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: zsojka at seznam dot cz GCC host triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42325