public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53137] New: g++ segfault
@ 2012-04-27  9:22 valery.bickov at gmail dot com
  2012-04-27 10:42 ` [Bug c++/53137] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: valery.bickov at gmail dot com @ 2012-04-27  9:22 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53137
           Summary: g++ segfault
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: valery.bickov@gmail.com


4.7.0 and 4.8 segfaults on Linux x86-64 with the following code:

template <typename STORE>
void getParent(STORE& tStore)
{
}

struct Store
{
    template <typename CheckParentFunc>
    void updateChildCommon(CheckParentFunc c);

    template <typename T>
    int& getStore();

    template <typename T>
    void updateChild(const T& obj)
    {
        updateChildCommon([this] () { getParent(getStore<T>()); });
    }

    void update(int obj)
    {
        updateChild(obj);
    }
};

$ /usr/local/gcc-4.7.0/bin/g++ gcc-4.7.0-crash.cpp -std=c++11 
gcc-4.7.0-crash.cpp: In instantiation of 'Store::updateChild(const T&) [with T
= int]::<lambda()>':
gcc-4.7.0-crash.cpp:17:28:   required from 'struct Store::updateChild(const T&)
[with T = int]::<lambda()>'
gcc-4.7.0-crash.cpp:17:9:   required from 'void Store::updateChild(const T&)
[with T = int]'
gcc-4.7.0-crash.cpp:22:24:   required from here
gcc-4.7.0-crash.cpp:17:39: 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.

$ /usr/local/gcc-4.7.0/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc-4.7.0/bin/g++
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.7.0/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/usr/local/gcc-4.7.0 --disable-multilib
--enable-languages=c,c++
Thread model: posix
gcc version 4.7.0 (GCC)


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

end of thread, other threads:[~2013-03-16 13:04 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
2012-04-27 10:42 ` [Bug c++/53137] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
2012-05-23 12:36 ` jakub at gcc dot gnu.org
2012-05-29 14:18 ` rguenth at gcc dot gnu.org
2012-05-31 21:31 ` jason at gcc dot gnu.org
2012-06-01 16:55 ` jason at gcc dot gnu.org
2012-06-01 18:43 ` jason at gcc dot gnu.org
2012-06-01 18:47 ` jason at gcc dot gnu.org
2012-06-12 15:01 ` jason at gcc dot gnu.org
2012-06-12 15:06 ` jason at gcc dot gnu.org
2012-06-20  7:22 ` jason at gcc dot gnu.org
2012-09-26 11:12 ` valery.bickov+gcc at gmail dot com
2012-09-26 11:35 ` rguenth at gcc dot gnu.org
2012-11-02 11:51 ` paolo.carlini at oracle dot com
2012-11-02 11:52 ` paolo.carlini at oracle dot com
2012-11-19 14:59 ` paolo.carlini at oracle dot com
2012-11-29 15:32 ` oakad at yahoo dot com
2012-11-29 15:37 ` paolo.carlini at oracle dot com
2012-11-29 20:13 ` jason at gcc dot gnu.org
2012-11-29 20:18 ` jason at gcc dot gnu.org
2012-11-29 20:29 ` jason at gcc dot gnu.org
2012-11-29 22:20 ` paolo.carlini at oracle dot com
2013-01-03 16:22 ` paolo.carlini at oracle dot com
2013-02-12 14:41 ` paolo.carlini at oracle dot com
2013-02-13 10:40 ` paolo.carlini at oracle dot com
2013-02-20 23:27 ` paolo.carlini at oracle dot com
2013-03-16 13:04 ` paolo.carlini at oracle dot com

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).