public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54383] New: Internal compiler error for lamba function using this-> with -std=c++0x
@ 2012-08-27  8:34 gerald at pfeifer dot com
  2012-09-24 12:54 ` [Bug c++/54383] " 166291 at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: gerald at pfeifer dot com @ 2012-08-27  8:34 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54383
           Summary: Internal compiler error for lamba function using
                    this-> with -std=c++0x
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gerald@pfeifer.com


The following snippet fails with an internal compiler error on
current SVN:

  auto foo = [&](int a) { return a > this->b; };

~/gcc-x86_64/bin/g++ -std=c++0x x.cc
x.cc: In lambda function:
x.cc:1:36: internal compiler error: Segmentation fault
 auto foo = [&](int a) { return a > this->b; };
                                    ^


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

* [Bug c++/54383] Internal compiler error for lamba function using this-> with -std=c++0x
  2012-08-27  8:34 [Bug c++/54383] New: Internal compiler error for lamba function using this-> with -std=c++0x gerald at pfeifer dot com
@ 2012-09-24 12:54 ` 166291 at gmail dot com
  2012-09-26 18:45 ` 166291 at gmail dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: 166291 at gmail dot com @ 2012-09-24 12:54 UTC (permalink / raw)
  To: gcc-bugs


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

166291 at gmail dot com changed:

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

--- Comment #1 from 166291 at gmail dot com 2012-09-24 12:53:57 UTC ---
The following code breaks GCC 4.7.1:

   auto test = [=]() { this

Yes, I didn't paste that badly. That entire line of code alone by itself in the
file will crash GCC.


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

* [Bug c++/54383] Internal compiler error for lamba function using this-> with -std=c++0x
  2012-08-27  8:34 [Bug c++/54383] New: Internal compiler error for lamba function using this-> with -std=c++0x gerald at pfeifer dot com
  2012-09-24 12:54 ` [Bug c++/54383] " 166291 at gmail dot com
@ 2012-09-26 18:45 ` 166291 at gmail dot com
  2012-12-06 16:02 ` redi at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: 166291 at gmail dot com @ 2012-09-26 18:45 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from 166291 at gmail dot com 2012-09-26 18:45:36 UTC ---
Some more information is that this only seems to happen when the lambda
captures variables, and it's in the global scope.


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

* [Bug c++/54383] Internal compiler error for lamba function using this-> with -std=c++0x
  2012-08-27  8:34 [Bug c++/54383] New: Internal compiler error for lamba function using this-> with -std=c++0x gerald at pfeifer dot com
  2012-09-24 12:54 ` [Bug c++/54383] " 166291 at gmail dot com
  2012-09-26 18:45 ` 166291 at gmail dot com
@ 2012-12-06 16:02 ` redi at gcc dot gnu.org
  2013-02-16  5:33 ` jason at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2012-12-06 16:02 UTC (permalink / raw)
  To: gcc-bugs


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-12-06
     Ever Confirmed|0                           |1


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

* [Bug c++/54383] Internal compiler error for lamba function using this-> with -std=c++0x
  2012-08-27  8:34 [Bug c++/54383] New: Internal compiler error for lamba function using this-> with -std=c++0x gerald at pfeifer dot com
                   ` (2 preceding siblings ...)
  2012-12-06 16:02 ` redi at gcc dot gnu.org
@ 2013-02-16  5:33 ` jason at gcc dot gnu.org
  2013-02-27 10:25 ` paolo.carlini at oracle dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-16  5:33 UTC (permalink / raw)
  To: gcc-bugs


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

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

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


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

* [Bug c++/54383] Internal compiler error for lamba function using this-> with -std=c++0x
  2012-08-27  8:34 [Bug c++/54383] New: Internal compiler error for lamba function using this-> with -std=c++0x gerald at pfeifer dot com
                   ` (3 preceding siblings ...)
  2013-02-16  5:33 ` jason at gcc dot gnu.org
@ 2013-02-27 10:25 ` paolo.carlini at oracle dot com
  2013-02-27 10:27 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-02-27 10:25 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ogoffart at kde dot org

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-02-27 10:24:21 UTC ---
*** Bug 56464 has been marked as a duplicate of this bug. ***


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

* [Bug c++/54383] Internal compiler error for lamba function using this-> with -std=c++0x
  2012-08-27  8:34 [Bug c++/54383] New: Internal compiler error for lamba function using this-> with -std=c++0x gerald at pfeifer dot com
                   ` (4 preceding siblings ...)
  2013-02-27 10:25 ` paolo.carlini at oracle dot com
@ 2013-02-27 10:27 ` paolo.carlini at oracle dot com
  2013-03-02 15:13 ` ogoffart at kde dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-02-27 10:27 UTC (permalink / raw)
  To: gcc-bugs


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

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

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

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-02-27 10:26:29 UTC ---
Jason, I see you are already working on this one: please double check that
PR56464 is an exact duplicate. Thanks!


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

* [Bug c++/54383] Internal compiler error for lamba function using this-> with -std=c++0x
  2012-08-27  8:34 [Bug c++/54383] New: Internal compiler error for lamba function using this-> with -std=c++0x gerald at pfeifer dot com
                   ` (5 preceding siblings ...)
  2013-02-27 10:27 ` paolo.carlini at oracle dot com
@ 2013-03-02 15:13 ` ogoffart at kde dot org
  2013-03-04 17:14 ` jason at gcc dot gnu.org
  2013-03-04 17:15 ` jason at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: ogoffart at kde dot org @ 2013-03-02 15:13 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Olivier Goffart <ogoffart at kde dot org> 2013-03-02 15:12:54 UTC ---
The code in Bug 56464 is valid code:
struct bug { bug*a = [&](){return this;}(); };
(Just in case this may change the priority)


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

* [Bug c++/54383] Internal compiler error for lamba function using this-> with -std=c++0x
  2012-08-27  8:34 [Bug c++/54383] New: Internal compiler error for lamba function using this-> with -std=c++0x gerald at pfeifer dot com
                   ` (6 preceding siblings ...)
  2013-03-02 15:13 ` ogoffart at kde dot org
@ 2013-03-04 17:14 ` jason at gcc dot gnu.org
  2013-03-04 17:15 ` jason at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2013-03-04 17:14 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2013-03-04 17:12:48 UTC ---
Author: jason
Date: Mon Mar  4 17:12:32 2013
New Revision: 196437

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196437
Log:
    PR c++/56464
    PR c++/54383
    * semantics.c (lambda_expr_this_capture): Handle NSDMI
    and non-class scopes.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi1.C
    trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this10.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c


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

* [Bug c++/54383] Internal compiler error for lamba function using this-> with -std=c++0x
  2012-08-27  8:34 [Bug c++/54383] New: Internal compiler error for lamba function using this-> with -std=c++0x gerald at pfeifer dot com
                   ` (7 preceding siblings ...)
  2013-03-04 17:14 ` jason at gcc dot gnu.org
@ 2013-03-04 17:15 ` jason at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2013-03-04 17:15 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.8.0

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2013-03-04 17:14:33 UTC ---
Fixed for 4.8.


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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-27  8:34 [Bug c++/54383] New: Internal compiler error for lamba function using this-> with -std=c++0x gerald at pfeifer dot com
2012-09-24 12:54 ` [Bug c++/54383] " 166291 at gmail dot com
2012-09-26 18:45 ` 166291 at gmail dot com
2012-12-06 16:02 ` redi at gcc dot gnu.org
2013-02-16  5:33 ` jason at gcc dot gnu.org
2013-02-27 10:25 ` paolo.carlini at oracle dot com
2013-02-27 10:27 ` paolo.carlini at oracle dot com
2013-03-02 15:13 ` ogoffart at kde dot org
2013-03-04 17:14 ` jason at gcc dot gnu.org
2013-03-04 17:15 ` jason 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).