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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
@ 2012-04-27 10:42 ` rguenth at gcc dot gnu.org
  2012-05-23 12:36 ` jakub at gcc dot gnu.org
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-27 10:42 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-04-27
   Target Milestone|---                         |4.7.1
            Summary|g++ segfault                |[4.7/4.8 Regression] g++
                   |                            |segfault
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-27 10:41:55 UTC ---
Confirmed.  4.6 rejects the testcase.


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  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
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-23 12:36 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-23 12:26:54 UTC ---
Probably started ICEing with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177995


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  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
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-29 14:18 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (2 preceding siblings ...)
  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
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: jason at gcc dot gnu.org @ 2012-05-31 21:31 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jason at gcc dot gnu.org
                   |gnu.org                     |


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (3 preceding siblings ...)
  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
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: jason at gcc dot gnu.org @ 2012-06-01 16:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2012-06-01 16:55:21 UTC ---
Author: jason
Date: Fri Jun  1 16:55:17 2012
New Revision: 188117

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188117
Log:
    PR c++/53137
    * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
    (instantiate_decl): Don't push_to_top_level for local class methods.
    (instantiate_class_template_1): Or for local classes.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template5.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (4 preceding siblings ...)
  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
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: jason at gcc dot gnu.org @ 2012-06-01 18:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2012-06-01 18:43:39 UTC ---
Author: jason
Date: Fri Jun  1 18:43:34 2012
New Revision: 188123

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188123
Log:
    PR c++/53137
    * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
    (instantiate_decl): Don't push_to_top_level for local class methods.
    (instantiate_class_template_1): Or for local classes.

Added:
   
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template5.C
Modified:
    branches/gcc-4_7-branch/gcc/cp/ChangeLog
    branches/gcc-4_7-branch/gcc/cp/pt.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (5 preceding siblings ...)
  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
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: jason at gcc dot gnu.org @ 2012-06-01 18:47 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2012-06-01 18:47:13 UTC ---
Fixed for 4.7.1.


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (6 preceding siblings ...)
  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
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: jason at gcc dot gnu.org @ 2012-06-12 15:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2012-06-12 15:01:31 UTC ---
Author: jason
Date: Tue Jun 12 15:01:17 2012
New Revision: 188460

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188460
Log:
    PR c++/53599
    Revert:
    PR c++/53137
    * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
    (instantiate_decl): Don't push_to_top_level for local class methods.
    (instantiate_class_template_1): Or for local classes.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/g++.dg/template/local7.C
Removed:
   
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template5.C
Modified:
    branches/gcc-4_7-branch/gcc/cp/ChangeLog
    branches/gcc-4_7-branch/gcc/cp/pt.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (7 preceding siblings ...)
  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
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: jason at gcc dot gnu.org @ 2012-06-12 15:06 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.1                       |4.7.2

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2012-06-12 15:06:27 UTC ---
Fix pushed off to 4.7.2.


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (8 preceding siblings ...)
  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
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: jason at gcc dot gnu.org @ 2012-06-20  7:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> 2012-06-20 07:22:00 UTC ---
Author: jason
Date: Wed Jun 20 07:21:55 2012
New Revision: 188810

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188810
Log:
    Reapply:
    PR c++/53137
    * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
    (instantiate_decl): Don't push_to_top_level for local class methods.
    (instantiate_class_template_1): Or for local classes.

Added:
   
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template5.C
Modified:
    branches/gcc-4_7-branch/gcc/cp/ChangeLog
    branches/gcc-4_7-branch/gcc/cp/pt.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (9 preceding siblings ...)
  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
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: valery.bickov+gcc at gmail dot com @ 2012-09-26 11:12 UTC (permalink / raw)
  To: gcc-bugs


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

valery.bickov+gcc at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> 2012-06-20 07:22:00 UTC ---
Author: jason
Date: Wed Jun 20 07:21:55 2012
New Revision: 188810

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188810
Log:
    Reapply:
    PR c++/53137
    * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
    (instantiate_decl): Don't push_to_top_level for local class methods.
    (instantiate_class_template_1): Or for local classes.

Added:
   
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template5.C
Modified:
    branches/gcc-4_7-branch/gcc/cp/ChangeLog
    branches/gcc-4_7-branch/gcc/cp/pt.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog

--- Comment #9 from valery.bickov+gcc at gmail dot com 2012-09-26 11:12:24 UTC ---
Slightly modified example still crashes on 4.7.2:

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

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

    template <typename T>
    int& getStore();

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

    void update(int obj);
};

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

$ /usr/local/gcc-4.7.2/bin/g++ -c gcc-4.7.2-crash.cpp -std=c++11
gcc-4.7.2-crash.cpp: In lambda function:
gcc-4.7.2-crash.cpp:29:1: internal compiler error: in get_expr_operands, at
tree-ssa-operands.c:1035
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.2/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc-4.7.2/bin/g++
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.7.2/libexec/gcc/x86_64-unknown-linux-gnu/4.7.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/usr/local/gcc-4.7.2 --enable-lto
--disable-multilib --enable-languages=c,c++
Thread model: posix
gcc version 4.7.2 (GCC) 

It compiles ok if I remove c() call or move update(int) definition body into
class.

g++-4.6.3 works with it.

I changed status to reopened excuse me if I shouldn't do it.


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (10 preceding siblings ...)
  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
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-26 11:35 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-26 11:34:49 UTC ---
Probably wants a new bugreport, but confirmed:

(gdb) call debug_gimple_stmt (stmt)
__this.0 = __this;

and __this is

 <field_decl 0x7ffff5c0c980 __this
    type <pointer_type 0x7ffff5c1c888
        type <record_type 0x7ffff5c1c2a0 Store type_5 type_6 QI
            size <integer_cst 0x7ffff5ae0120 constant 8>
            unit size <integer_cst 0x7ffff5ae0140 constant 1>

eh, a bare FIELD_DECL?!

Store::updateChild(const T&) [with T = int]::<lambda()> (const struct __lambda0
* const __closure)
{
  struct Store * __this.0;
  int & D.2050;
  struct Store * const this [value-expr: ((const struct __lambda0 *)
__closure)->__this];

  __this.0 = __this;
  D.2050 = Store::getStore<int> (__this.0);

possibly confused from this.


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (11 preceding siblings ...)
  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
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-02 11:51 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zsojka at seznam dot cz

--- Comment #11 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-02 11:51:00 UTC ---
*** Bug 53697 has been marked as a duplicate of this bug. ***


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (12 preceding siblings ...)
  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
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-02 11:52 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |m101010a at gmail dot com

--- Comment #12 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-02 11:52:07 UTC ---
*** Bug 54431 has been marked as a duplicate of this bug. ***


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (13 preceding siblings ...)
  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
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-19 14:59 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david at aitellu dot com

--- Comment #13 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-19 14:58:49 UTC ---
*** Bug 55392 has been marked as a duplicate of this bug. ***


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (14 preceding siblings ...)
  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
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: oakad at yahoo dot com @ 2012-11-29 15:32 UTC (permalink / raw)
  To: gcc-bugs


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

Alexander Dubov <oakad at yahoo dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |oakad at yahoo dot com

--- Comment #14 from Alexander Dubov <oakad at yahoo dot com> 2012-11-29 15:31:46 UTC ---
Because this bug is so annoying, I thought it may be helpful if I add an
another example:
(clang-3.1 works in all cases)

template <typename value_type>
struct test {
    test(std::initializer_list<value_type> l)
    {
        insert(l.begin(), l.end());
    }

    template <typename input_iter_t>
    void insert(input_iter_t first, input_iter_t last)
    {
        std::for_each(
            first, last, [this](value_type const &v) -> void {
                // works on both gcc-4.6.3 and gcc-4.7.2
                this->insert(v);
                // won't compile on 4.6.3,
                                // ICE at tree-ssa-operands.c:1035 on 4.7.2
                insert(v);
            }
        );
    }

    void insert(value_type const &v)
    {
        std::cout << v << std::endl;
    }
};


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (15 preceding siblings ...)
  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
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-29 15:37 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #15 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-29 15:36:53 UTC ---
Frankly, additional examples which are neither self-contained nor minimized
don't help that much. That said, this is a regression and we have already a
minimized snippet, thus we are set. When the bug will be closed, please double
check that the fix works for your code too, thanks!


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (16 preceding siblings ...)
  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
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: jason at gcc dot gnu.org @ 2012-11-29 20:13 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #16 from Jason Merrill <jason at gcc dot gnu.org> 2012-11-29 20:13:04 UTC ---
Author: jason
Date: Thu Nov 29 20:12:58 2012
New Revision: 193954

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193954
Log:
    PR c++/53137
    * pt.c (tsubst_expr) [DECL_EXPR]: Set LAMBDA_EXPR_THIS_CAPTURE here.
    (tsubst_copy_and_build) [LAMBDA_EXPR]: And clear it here.
    (instantiate_class_template_1): Not here.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this6.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/pt.c


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (17 preceding siblings ...)
  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
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: jason at gcc dot gnu.org @ 2012-11-29 20:18 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #17 from Jason Merrill <jason at gcc dot gnu.org> 2012-11-29 20:17:36 UTC ---
Author: jason
Date: Thu Nov 29 20:17:20 2012
New Revision: 193957

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193957
Log:
    PR c++/53137
    * pt.c (tsubst_expr) [DECL_EXPR]: Set LAMBDA_EXPR_THIS_CAPTURE here.
    (tsubst_copy_and_build) [LAMBDA_EXPR]: And clear it here.
    (instantiate_class_template_1): Not here.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this6.C
Modified:
    branches/gcc-4_7-branch/gcc/cp/ChangeLog
    branches/gcc-4_7-branch/gcc/cp/cp-tree.h
    branches/gcc-4_7-branch/gcc/cp/pt.c


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (18 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: jason at gcc dot gnu.org @ 2012-11-29 20:29 UTC (permalink / raw)
  To: gcc-bugs


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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #18 from Jason Merrill <jason at gcc dot gnu.org> 2012-11-29 20:28:31 UTC ---
Should really be fixed now.


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (19 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-29 22:20 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |etlverified at gmail dot
                   |                            |com

--- Comment #19 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-29 22:19:50 UTC ---
*** Bug 55538 has been marked as a duplicate of this bug. ***


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (20 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-01-03 16:22 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kyle.t.konrad at gmail dot
                   |                            |com

--- Comment #20 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-01-03 16:21:31 UTC ---
*** Bug 55853 has been marked as a duplicate of this bug. ***


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (21 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-02-12 14:41 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ers.trion at gmail dot com

--- Comment #21 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-02-12 14:41:23 UTC ---
*** Bug 56299 has been marked as a duplicate of this bug. ***


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (22 preceding siblings ...)
  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
  25 siblings, 0 replies; 27+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-02-13 10:40 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |crillion at tiscali dot it

--- Comment #22 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-02-13 10:40:03 UTC ---
*** Bug 56304 has been marked as a duplicate of this bug. ***


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (23 preceding siblings ...)
  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
  25 siblings, 0 replies; 27+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-02-20 23:27 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jetrull at sbcglobal dot
                   |                            |net

--- Comment #23 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-02-20 23:27:22 UTC ---
*** Bug 56413 has been marked as a duplicate of this bug. ***


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

* [Bug c++/53137] [4.7/4.8 Regression] g++ segfault
  2012-04-27  9:22 [Bug c++/53137] New: g++ segfault valery.bickov at gmail dot com
                   ` (24 preceding siblings ...)
  2013-02-20 23:27 ` paolo.carlini at oracle dot com
@ 2013-03-16 13:04 ` paolo.carlini at oracle dot com
  25 siblings, 0 replies; 27+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-03-16 13:04 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |allocator64 at gmail dot
                   |                            |com

--- Comment #24 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-03-16 13:04:11 UTC ---
*** Bug 56632 has been marked as a duplicate of this bug. ***


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