Command line: g++ testcase.C Tested revisions: r157877 - crash 4.4 r157895 - crash 4.3.4 - crash (bails out, no checking) 3.4.6 - crash (bails out, no checking) 3.3.6 - OK (no checking)
Valgrind output: $ valgrind -q --trace-children=yes /mnt/svn/gcc-trunk/binary-157877-lto/bin/g++ testcase.C testcase.C:3:30: error: template parameters not used in partial specialization: testcase.C:3:30: error: '<template-parameter-1-1>' ==5113== Invalid read of size 8 ==5113== at 0x785580: size_binop_loc (fold-const.c:2157) ==5113== by 0x7D83FA: gimplify_compound_lval (gimplify.c:1987) ==5113== by 0x7D3BCF: gimplify_expr (gimplify.c:6569) ==5113== by 0x7E71C9: gimplify_modify_expr (gimplify.c:4460) ==5113== by 0x7D4B34: gimplify_expr (gimplify.c:6614) ==5113== by 0x7DB326: gimplify_stmt (gimplify.c:5264) ==5113== by 0x7DBD32: gimplify_and_add (gimplify.c:391) ==5113== by 0x7DCCDC: gimplify_return_expr (gimplify.c:1241) ==5113== by 0x7D41CE: gimplify_expr (gimplify.c:6763) ==5113== by 0x7DB326: gimplify_stmt (gimplify.c:5264) ==5113== by 0x7E7FFA: gimplify_body (gimplify.c:7523) ==5113== by 0x7E83E4: gimplify_function_tree (gimplify.c:7619) ==5113== Address 0x10 is not stack'd, malloc'd or (recently) free'd ==5113== testcase.C: In member function 'int A<int>::f()': testcase.C:11:10: 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. -- Summary: [4.3/4.4/4.5 Regression] ICE: SIGSEGV with invalid template specialization Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal 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 GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43630