public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59991] New: Recursive lambda capture in C++1y constexpr function template causes internal compiler error
@ 2014-01-29 21:17 pkeir at outlook dot com
2014-01-29 21:19 ` [Bug c++/59991] " pkeir at outlook dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: pkeir at outlook dot com @ 2014-01-29 21:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59991
Bug ID: 59991
Summary: Recursive lambda capture in C++1y constexpr function
template causes internal compiler error
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: pkeir at outlook dot com
Created attachment 31987
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31987&action=edit
The test case which produces the internal compiler error
The code below uses the C++1y feature of allowing declarations in constexpr
functions, but r should not be included in the lambda's capture list. There is
also an issue with excessive recursive template instantiation. In any case, the
code produces an internal compiler error starting with:
internal compiler error: in tsubst, at cp/pt.c:11350
auto f = [r,x]() { return r(x); };
The full output and test case is attached. This was run under Ubuntu 13.10.
// $ g++ --version
// g++ (GCC) 4.9.0 20131201 (experimental)
template <typename T>
constexpr int r(T x) {
auto f = [r,x]() { return r(x); };
return 0;
}
int main(int argc, char *argv[])
{
r(0);
return 0;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/59991] Recursive lambda capture in C++1y constexpr function template causes internal compiler error
2014-01-29 21:17 [Bug c++/59991] New: Recursive lambda capture in C++1y constexpr function template causes internal compiler error pkeir at outlook dot com
@ 2014-01-29 21:19 ` pkeir at outlook dot com
2015-03-16 15:03 ` mpolacek at gcc dot gnu.org
2015-06-23 8:47 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pkeir at outlook dot com @ 2014-01-29 21:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59991
--- Comment #1 from Paul Keir <pkeir at outlook dot com> ---
Created attachment 31988
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31988&action=edit
The output following: g++ -std=c++1y bug.cpp
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/59991] Recursive lambda capture in C++1y constexpr function template causes internal compiler error
2014-01-29 21:17 [Bug c++/59991] New: Recursive lambda capture in C++1y constexpr function template causes internal compiler error pkeir at outlook dot com
2014-01-29 21:19 ` [Bug c++/59991] " pkeir at outlook dot com
@ 2015-03-16 15:03 ` mpolacek at gcc dot gnu.org
2015-06-23 8:47 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-16 15:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59991
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-03-16
CC| |mpolacek at gcc dot gnu.org
Target Milestone|--- |4.8.5
Ever confirmed|0 |1
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed with 4.9/4.8. This has been fixed on trunk with r210829.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/59991] Recursive lambda capture in C++1y constexpr function template causes internal compiler error
2014-01-29 21:17 [Bug c++/59991] New: Recursive lambda capture in C++1y constexpr function template causes internal compiler error pkeir at outlook dot com
2014-01-29 21:19 ` [Bug c++/59991] " pkeir at outlook dot com
2015-03-16 15:03 ` mpolacek at gcc dot gnu.org
@ 2015-06-23 8:47 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-23 8:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59991
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |5.0
Target Milestone|4.8.5 |---
Known to fail| |4.8.5, 4.9.2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-23 8:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-29 21:17 [Bug c++/59991] New: Recursive lambda capture in C++1y constexpr function template causes internal compiler error pkeir at outlook dot com
2014-01-29 21:19 ` [Bug c++/59991] " pkeir at outlook dot com
2015-03-16 15:03 ` mpolacek at gcc dot gnu.org
2015-06-23 8:47 ` rguenth 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).