Command line: gcc -O3 -fkeep-inline-functions testcase.C or gcc -O2 -fipa-cp-clone -fkeep-inline-functions testcase.C or gcc -O1 -fipa-cp -fipa-cp-clone -fkeep-inline-functions testcase.C
----- testcase.C ----- #include <sstream> std::stringstream ss; ---------------------- I am reducing the preprocessed testcase. Tested versions: r157877 - crash r153685 - OK 4.4 r157895 - OK Valgrind output: $ valgrind -q --trace-children=yes /mnt/svn/gcc-trunk/binary-157877-lto/bin/gcc -O3 -fkeep-inline-functions testcase.C ==25065== Invalid read of size 1 ==25065== at 0xB03750: optimize_inline_calls (tree-inline.c:3635) ==25065== by 0xAD75F6: inline_transform (ipa-inline.c:2011) ==25065== by 0x856862: execute_all_ipa_transforms (passes.c:1468) ==25065== by 0x94D0EC: tree_rest_of_compilation (tree-optimize.c:406) ==25065== by 0xAD1540: cgraph_expand_function (cgraphunit.c:1548) ==25065== by 0xAD3D44: cgraph_optimize (cgraphunit.c:1627) ==25065== by 0xAD4474: cgraph_finalize_compilation_unit (cgraphunit.c:1096) ==25065== by 0x54FA5A: cp_write_global_declarations (decl2.c:3833) ==25065== by 0x8FBC44: toplev_main (toplev.c:1065) ==25065== by 0x657DA3C: (below main) (in /lib64/libc-2.10.1.so) ==25065== Address 0x8b is not stack'd, malloc'd or (recently) free'd ==25065== In file included from testcase.C:1:0: /mnt/svn/gcc-trunk/binary-157877-lto/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/sstream: In function '(static initializers for /mnt/svn/gcc-trunk/binary-157877-lto/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/sstream)': /mnt/svn/gcc-trunk/binary-157877-lto/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/sstream:511:44: 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.5 Regression] ICE: SIGSEGV with -fipa-cp-clone - fkeep-inline-functions Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization 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=43611