public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56135] New: [c++11] this incorrectly captured as null in template member function
@ 2013-01-29 2:19 arnetheduck at gmail dot com
2013-01-29 10:56 ` [Bug c++/56135] " paolo.carlini at oracle dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: arnetheduck at gmail dot com @ 2013-01-29 2:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56135
Bug #: 56135
Summary: [c++11] this incorrectly captured as null in template
member function
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: arnetheduck@gmail.com
Created attachment 29298
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29298
Test case showing broken capture of this
When creating a lambda function in a template member function, when capturing
this using [=], this is not captured correctly when the lambda only calls
another template member function reusing the outer template argument.
Qualifying the call with this or not passing on the outer template argument
solves the issue.
In the attached code, I expect this to be captured in all 4 cases, but the
"broken" captures null resulting in the print out:
./test
(nil)
0x7fff1354f2af
0x7fff1354f2af
0x7fff1354f2af
GDB shows the same - this has been captured but with null as value.
clang 3.2 captures this as expected.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56135] [c++11] this incorrectly captured as null in template member function
2013-01-29 2:19 [Bug c++/56135] New: [c++11] this incorrectly captured as null in template member function arnetheduck at gmail dot com
@ 2013-01-29 10:56 ` paolo.carlini at oracle dot com
2013-02-13 2:25 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-01-29 10:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56135
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-01-29
Ever Confirmed|0 |1
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-01-29 10:56:02 UTC ---
Probably Dup of PR54403.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56135] [c++11] this incorrectly captured as null in template member function
2013-01-29 2:19 [Bug c++/56135] New: [c++11] this incorrectly captured as null in template member function arnetheduck at gmail dot com
2013-01-29 10:56 ` [Bug c++/56135] " paolo.carlini at oracle dot com
@ 2013-02-13 2:25 ` jason at gcc dot gnu.org
2013-02-13 17:56 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-13 2:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56135
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] 7+ messages in thread
* [Bug c++/56135] [c++11] this incorrectly captured as null in template member function
2013-01-29 2:19 [Bug c++/56135] New: [c++11] this incorrectly captured as null in template member function arnetheduck at gmail dot com
2013-01-29 10:56 ` [Bug c++/56135] " paolo.carlini at oracle dot com
2013-02-13 2:25 ` jason at gcc dot gnu.org
@ 2013-02-13 17:56 ` jason at gcc dot gnu.org
2013-02-14 23:29 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-13 17:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56135
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2013-02-13 17:56:11 UTC ---
Author: jason
Date: Wed Feb 13 17:56:05 2013
New Revision: 196021
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196021
Log:
PR c++/56135
* pt.c (tsubst_copy_and_build): Don't forget any new
captures that arose from use of dependent names.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56135] [c++11] this incorrectly captured as null in template member function
2013-01-29 2:19 [Bug c++/56135] New: [c++11] this incorrectly captured as null in template member function arnetheduck at gmail dot com
` (2 preceding siblings ...)
2013-02-13 17:56 ` jason at gcc dot gnu.org
@ 2013-02-14 23:29 ` paolo.carlini at oracle dot com
2013-02-15 18:32 ` jason at gcc dot gnu.org
2013-02-15 18:36 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-02-14 23:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56135
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.8.0
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-02-14 23:29:27 UTC ---
Fixed for 4.8.0.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56135] [c++11] this incorrectly captured as null in template member function
2013-01-29 2:19 [Bug c++/56135] New: [c++11] this incorrectly captured as null in template member function arnetheduck at gmail dot com
` (3 preceding siblings ...)
2013-02-14 23:29 ` paolo.carlini at oracle dot com
@ 2013-02-15 18:32 ` jason at gcc dot gnu.org
2013-02-15 18:36 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-15 18:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56135
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2013-02-15 18:31:41 UTC ---
Author: jason
Date: Fri Feb 15 18:31:28 2013
New Revision: 196085
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196085
Log:
PR c++/56135
* pt.c (tsubst_copy_and_build): Don't forget any new
captures that arose from use of dependent names.
Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this8.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/pt.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/56135] [c++11] this incorrectly captured as null in template member function
2013-01-29 2:19 [Bug c++/56135] New: [c++11] this incorrectly captured as null in template member function arnetheduck at gmail dot com
` (4 preceding siblings ...)
2013-02-15 18:32 ` jason at gcc dot gnu.org
@ 2013-02-15 18:36 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-02-15 18:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56135
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.0 |4.7.3
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-02-15 18:35:34 UTC ---
... and 4.7.3.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-02-15 18:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-29 2:19 [Bug c++/56135] New: [c++11] this incorrectly captured as null in template member function arnetheduck at gmail dot com
2013-01-29 10:56 ` [Bug c++/56135] " paolo.carlini at oracle dot com
2013-02-13 2:25 ` jason at gcc dot gnu.org
2013-02-13 17:56 ` jason at gcc dot gnu.org
2013-02-14 23:29 ` paolo.carlini at oracle dot com
2013-02-15 18:32 ` jason at gcc dot gnu.org
2013-02-15 18:36 ` 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).