public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54403] New: [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler
@ 2012-08-29 10:14 ripper-tm at yandex dot ru
  2012-08-29 10:38 ` [Bug c++/54403] " ripper-tm at yandex dot ru
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ripper-tm at yandex dot ru @ 2012-08-29 10:14 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54403
           Summary: [C++11] operator! applied to a member of a templated
                    class in a lambda expression that captures 'this'
                    pointer crashes compiler
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ripper-tm@yandex.ru


Created attachment 28097
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28097
Source code

operator! applied to a member of a templated class in lambda that captures this
pointer crashes g++-4.7.1:

$ g++-4.7.1 bug.cpp -c --std=c++0x
bug.cpp: In lambda function:
bug.cpp:10:27: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions. 

$ g++-4.7.1 --version
g++-4.7.1 (Gentoo 4.7.1 p1.0, pie-0.5.3) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ emerge -pv gcc
...
[ebuild   R   #] sys-devel/gcc-4.7.1  USE="cxx fortran mudflap multislot nls
nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -go -graphite
-gtk (-hardened) (-libssp) (-multilib) -nocxx -nopie -nossp -objc -objc++
-objc-gc -test -vanilla" 36 kB


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

* [Bug c++/54403] [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler
  2012-08-29 10:14 [Bug c++/54403] New: [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler ripper-tm at yandex dot ru
@ 2012-08-29 10:38 ` ripper-tm at yandex dot ru
  2012-08-30 10:12 ` redi at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ripper-tm at yandex dot ru @ 2012-08-29 10:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Pavel <ripper-tm at yandex dot ru> 2012-08-29 10:38:21 UTC ---
This is a regression. 4.6.3 works well.


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

* [Bug c++/54403] [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler
  2012-08-29 10:14 [Bug c++/54403] New: [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler ripper-tm at yandex dot ru
  2012-08-29 10:38 ` [Bug c++/54403] " ripper-tm at yandex dot ru
@ 2012-08-30 10:12 ` redi at gcc dot gnu.org
  2012-09-10 16:58 ` ripper-tm at yandex dot ru
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2012-08-30 10:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |54367
           Severity|major                       |normal


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

* [Bug c++/54403] [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler
  2012-08-29 10:14 [Bug c++/54403] New: [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler ripper-tm at yandex dot ru
  2012-08-29 10:38 ` [Bug c++/54403] " ripper-tm at yandex dot ru
  2012-08-30 10:12 ` redi at gcc dot gnu.org
@ 2012-09-10 16:58 ` ripper-tm at yandex dot ru
  2012-09-11 10:37 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ripper-tm at yandex dot ru @ 2012-09-10 16:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Pavel <ripper-tm at yandex dot ru> 2012-09-10 16:58:15 UTC ---
Described bug seems to refer to a set of bugs related to "this" pointer in
lambdas. They can show up as wrong compiler errors or compiler segfaults.


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

* [Bug c++/54403] [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler
  2012-08-29 10:14 [Bug c++/54403] New: [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler ripper-tm at yandex dot ru
                   ` (2 preceding siblings ...)
  2012-09-10 16:58 ` ripper-tm at yandex dot ru
@ 2012-09-11 10:37 ` paolo.carlini at oracle dot com
  2012-10-04  1:22 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-09-11 10:37 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-09-11
     Ever Confirmed|0                           |1


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

* [Bug c++/54403] [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler
  2012-08-29 10:14 [Bug c++/54403] New: [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler ripper-tm at yandex dot ru
                   ` (3 preceding siblings ...)
  2012-09-11 10:37 ` paolo.carlini at oracle dot com
@ 2012-10-04  1:22 ` paolo.carlini at oracle dot com
  2012-11-24 10:04 ` stepik-777 at mail dot ru
  2013-02-06 10:14 ` paolo.carlini at oracle dot com
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-04  1:22 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |philipp at fb dot com

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-04 01:21:42 UTC ---
*** Bug 53921 has been marked as a duplicate of this bug. ***


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

* [Bug c++/54403] [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler
  2012-08-29 10:14 [Bug c++/54403] New: [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler ripper-tm at yandex dot ru
                   ` (4 preceding siblings ...)
  2012-10-04  1:22 ` paolo.carlini at oracle dot com
@ 2012-11-24 10:04 ` stepik-777 at mail dot ru
  2013-02-06 10:14 ` paolo.carlini at oracle dot com
  6 siblings, 0 replies; 8+ messages in thread
From: stepik-777 at mail dot ru @ 2012-11-24 10:04 UTC (permalink / raw)
  To: gcc-bugs


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

stepik-777 at mail dot ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stepik-777 at mail dot ru

--- Comment #4 from stepik-777 at mail dot ru 2012-11-24 10:03:55 UTC ---
You can use !this->m_barbar intead of !m_barbar as a workaround.

This bug is still present in 4.7.2.

template<typename T>
struct Struct
{
    int member;

    Struct()
    {
        [=]{ !this->member; }; // this works
        [=]{ !member; }; // internal compiler error: Segmentation fault
    }
};


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

* [Bug c++/54403] [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler
  2012-08-29 10:14 [Bug c++/54403] New: [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler ripper-tm at yandex dot ru
                   ` (5 preceding siblings ...)
  2012-11-24 10:04 ` stepik-777 at mail dot ru
@ 2013-02-06 10:14 ` paolo.carlini at oracle dot com
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-02-06 10:14 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-02-06 10:13:41 UTC ---
Fixed by the patch which fixed PR54122.

*** This bug has been marked as a duplicate of bug 54122 ***


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

end of thread, other threads:[~2013-02-06 10:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-29 10:14 [Bug c++/54403] New: [C++11] operator! applied to a member of a templated class in a lambda expression that captures 'this' pointer crashes compiler ripper-tm at yandex dot ru
2012-08-29 10:38 ` [Bug c++/54403] " ripper-tm at yandex dot ru
2012-08-30 10:12 ` redi at gcc dot gnu.org
2012-09-10 16:58 ` ripper-tm at yandex dot ru
2012-09-11 10:37 ` paolo.carlini at oracle dot com
2012-10-04  1:22 ` paolo.carlini at oracle dot com
2012-11-24 10:04 ` stepik-777 at mail dot ru
2013-02-06 10:14 ` 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).