http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58254
Bug ID: 58254 Summary: ICE when using PGO Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hrebejkt at gmail dot com Created attachment 30707 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30707&action=edit preprocessed testcase source file Error message: main.cpp: In destructor ‘std::_Function_base::~_Function_base()’: main.cpp:207:1: internal compiler error: Neoprávněný přístup do paměti (SIGSEGV) GCC version: Using built-in specs. COLLECT_GCC=g++-4.8.1 COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-4.8.1/configure --program-suffix=-4.8.1 Thread model: posix gcc version 4.8.1 (GCC) Cammands that trigger the bug: g++-4.8.1 -std=c++11 -fprofile-generate -o test main.ii ./test g++-4.8.1 -std=c++11 -fprofile-use -o test main.ii Additional info: There was no error when compiling without PGO and there was no error when compiling (with PGO) using gcc 4.7.2. Code overview: Preprecessed and reduce C++ source file is attached. It originally looked like this: #include <functional> void g(std::function<void () > f) {} int main(){ g([] {} ); }