public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52619] New: ICE/segmentation fault in lambda function
@ 2012-03-19 15:37 t.schuele at web dot de
2012-03-20 10:56 ` [Bug c++/52619] " paolo.carlini at oracle dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: t.schuele at web dot de @ 2012-03-19 15:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52619
Bug #: 52619
Summary: ICE/segmentation fault in lambda function
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: t.schuele@web.de
Hi, the following piece of code causes an ICE (segmentation fault) when
compiled with gcc-4.7.0-RC-20120302 (no problem with gcc 4.6.3):
#include <atomic>
template<typename T>
struct test {
std::atomic<int> x;
void foo() {
auto cond = [this] {return x != 0;};
}
};
It works if the value of x is loaded explicitly:
auto cond = [this] {return x.load() != 0;};
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/52619] ICE/segmentation fault in lambda function
2012-03-19 15:37 [Bug c++/52619] New: ICE/segmentation fault in lambda function t.schuele at web dot de
@ 2012-03-20 10:56 ` paolo.carlini at oracle dot com
2012-03-20 11:07 ` paolo.carlini at oracle dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-03-20 10:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52619
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-03-20
Ever Confirmed|0 |1
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-03-20 10:54:16 UTC ---
Confirmed. We should figure out a reduced testcase not including anything
(note: the internals of <atomic> are completely different in 4.7 vs 4.6)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/52619] ICE/segmentation fault in lambda function
2012-03-19 15:37 [Bug c++/52619] New: ICE/segmentation fault in lambda function t.schuele at web dot de
2012-03-20 10:56 ` [Bug c++/52619] " paolo.carlini at oracle dot com
@ 2012-03-20 11:07 ` paolo.carlini at oracle dot com
2012-03-22 15:44 ` t.schuele at web dot de
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-03-20 11:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52619
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-03-20 11:03:00 UTC ---
The crash happens in lvalue_kind: an INDIRECT_REF with no TREE_TYPE.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/52619] ICE/segmentation fault in lambda function
2012-03-19 15:37 [Bug c++/52619] New: ICE/segmentation fault in lambda function t.schuele at web dot de
2012-03-20 10:56 ` [Bug c++/52619] " paolo.carlini at oracle dot com
2012-03-20 11:07 ` paolo.carlini at oracle dot com
@ 2012-03-22 15:44 ` t.schuele at web dot de
2012-03-22 16:40 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: t.schuele at web dot de @ 2012-03-22 15:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52619
--- Comment #3 from Tobias Schuele <t.schuele at web dot de> 2012-03-22 15:36:42 UTC ---
Here is a testcase not including anything:
template <typename T>
struct foo {
operator T() {
return T();
}
};
template<typename T>
struct test {
foo<int> x;
void bar() {
auto f = [this] {return x != 0;};
}
};
As in the above testcase, the ICE disappears if implicit type conversion is
avoided:
auto f = [this] {return (int)x != 0;};
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/52619] ICE/segmentation fault in lambda function
2012-03-19 15:37 [Bug c++/52619] New: ICE/segmentation fault in lambda function t.schuele at web dot de
` (2 preceding siblings ...)
2012-03-22 15:44 ` t.schuele at web dot de
@ 2012-03-22 16:40 ` paolo.carlini at oracle dot com
2012-10-04 1:31 ` paolo.carlini at oracle dot com
2013-02-06 10:12 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-03-22 16:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52619
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-03-22 16:30:02 UTC ---
Thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/52619] ICE/segmentation fault in lambda function
2012-03-19 15:37 [Bug c++/52619] New: ICE/segmentation fault in lambda function t.schuele at web dot de
` (3 preceding siblings ...)
2012-03-22 16:40 ` paolo.carlini at oracle dot com
@ 2012-10-04 1:31 ` paolo.carlini at oracle dot com
2013-02-06 10:12 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-04 1:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52619
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-04 01:31:22 UTC ---
Probably Dup of PR54403.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/52619] ICE/segmentation fault in lambda function
2012-03-19 15:37 [Bug c++/52619] New: ICE/segmentation fault in lambda function t.schuele at web dot de
` (4 preceding siblings ...)
2012-10-04 1:31 ` paolo.carlini at oracle dot com
@ 2013-02-06 10:12 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-02-06 10:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52619
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-02-06 10:12:00 UTC ---
Fixed by the patch which fixed PR54122.
*** This bug has been marked as a duplicate of bug 54122 ***
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-02-06 10:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-19 15:37 [Bug c++/52619] New: ICE/segmentation fault in lambda function t.schuele at web dot de
2012-03-20 10:56 ` [Bug c++/52619] " paolo.carlini at oracle dot com
2012-03-20 11:07 ` paolo.carlini at oracle dot com
2012-03-22 15:44 ` t.schuele at web dot de
2012-03-22 16:40 ` paolo.carlini at oracle dot com
2012-10-04 1:31 ` paolo.carlini at oracle dot com
2013-02-06 10:12 ` 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).