public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59255] New: Segmentation fault with std::function and -fprofile-use
@ 2013-11-22 16:24 stepik-777 at mail dot ru
  2013-11-25  9:32 ` [Bug c++/59255] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: stepik-777 at mail dot ru @ 2013-11-22 16:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59255

            Bug ID: 59255
           Summary: Segmentation fault with std::function and
                    -fprofile-use
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: stepik-777 at mail dot ru

Consider the following simple program:
#include <functional>

int main(int argc, char *argv[])
{
    std::function<int ()> f = []{ return 0; };
    return 0;
}

I'm compiling it with these commands:
g++ -std=c++11 -fprofile-generate -c test.cpp -o test.o
g++ -std=c++11 -fprofile-generate -o test test.o
./test # execute to generate profiling data
g++ -std=c++11 -fprofile-use -c test.cpp -o test.o
#g++ -std=c++11 -fprofile-use -o test test.o

This causes segfault when compiling with -fprofile-use:
test.cpp: In destructor 'std::_Function_base::~_Function_base()':
test.cpp:7:1: internal compiler error: Segmentation fault
 }
 ^

Tested with these two gcc versions:
g++ (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1
g++.exe (rev0, Built by MinGW-W64 project) 4.8.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-12-20 16:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-22 16:24 [Bug c++/59255] New: Segmentation fault with std::function and -fprofile-use stepik-777 at mail dot ru
2013-11-25  9:32 ` [Bug c++/59255] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2013-12-11 23:45 ` mark at jarv dot in
2013-12-12 16:03 ` mark at jarv dot in
2013-12-12 16:34 ` mark at jarv dot in
2013-12-19 15:34 ` rguenth at gcc dot gnu.org
2013-12-20 16:32 ` jakub at gcc dot gnu.org
2013-12-20 16:34 ` jakub at gcc dot gnu.org
2013-12-20 16:37 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).