public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52302] New: [4.6.2] cc1plus.exe hungs when compiling
@ 2012-02-17 23:16 xnko at hotmail dot com
  2012-02-18  0:19 ` [Bug c++/52302] " paolo.carlini at oracle dot com
  2012-02-20 12:13 ` rguenth at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: xnko at hotmail dot com @ 2012-02-17 23:16 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52302
           Summary: [4.6.2] cc1plus.exe hungs when compiling
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: xnko@hotmail.com


trying to compile this code cc1plus hungs, and when debugging in Visual Studio,
debugger catches stackoverflow exception.

gcc 4.6.2

cpp.cpp:
#include <iostream>
#include <functional>

void open(std::function<void()> callback)
{
    callback();
}

void read(std::function<void()> callback)
{
    auto opencb = ([&]()
    {
        int x = 0;

        return [=]() mutable {
            x++; 

            callback();
        };
    })();

    open(opencb);
}

int main(int argc, char **argv)
{
    read([]() {});

    return 0;
}

command line:
>g++ -c cpp.cpp -g -Wall -Wextra -std=c++0x -o cpp.o


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

end of thread, other threads:[~2012-02-20 12:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-17 23:16 [Bug c++/52302] New: [4.6.2] cc1plus.exe hungs when compiling xnko at hotmail dot com
2012-02-18  0:19 ` [Bug c++/52302] " paolo.carlini at oracle dot com
2012-02-20 12:13 ` rguenth 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).