public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/47687] New: [C++0x] Crash on a lambda returning a lambda (using std::function)
@ 2011-02-10 19:53 vituscze at gmail dot com
2011-02-11 18:59 ` [Bug c++/47687] " redi at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: vituscze at gmail dot com @ 2011-02-10 19:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47687
Summary: [C++0x] Crash on a lambda returning a lambda (using
std::function)
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: vituscze@gmail.com
Created attachment 23300
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23300
Output of -save-temps
Hello,
cc1plus.exe crashes (together with Windows prompt "Program has stopped
working...") while compiling the following code (if it is of any use):
#include <functional>
using std::function;
typedef function<int (int)> int_int_f;
int_int_f a = [] (int x)
{
return x + 3;
};
function<int_int_f (int_int_f)> b = [] (int_int_f f)
{
return [=] (int x)
{
return f(x) * f(x);
};
};
int main()
{ }
Command line:
g++ -std=c++0x -Wall crash.cpp
Compiler produces no warnings or errors.
Using GCC 4.6.0 20110205 on Windows Vista (32bit).
Output of g++ -v:
Built by Equation Solution <http://www.Equation.com>.
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/gcc/bin/../libexec/gcc/i686-pc-mingw32/4.6.0/lto-wrapper.exe
Target: i686-pc-mingw32
Configured with: ../gcc-4.6-20110205-mingw/configure --host=i686-pc-mingw32
--build=x86_64-unknown-linux-gnu --target=i686-pc-mingw32
--prefix=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/gcc/4.6-20110205
--with-lto-plugin --with-gcc --with-gnu-ld --with-gnu-as
--with-host-libstdcxx='-lstdc++ -lsupc++ -lm'
--with-ppl=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/ppl
--with-cloog=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/cloog
--with-gmp=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/gmp
--with-mpfr=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/mpfr
--with-mpc=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/mpc
--with-sysroot=/home/gfortran/gcc-home/binary/mingw32/cross/x86_32/gcc/4.6-20110205
--enable-languages=c,c++,fortran --enable-libgomp --enable-threads=win32
--enable-lto --enable-static --enable-cloog-backend=ppl --disable-shared
--disable-nls --disable-tls --disable-win32-registry
Thread model: win32
gcc version 4.6.0 20110205 (experimental) (GCC)
Output of g++ -std=c++0x crash.cpp -save-temps is in attachment.
Thanks for your time,
Vít Šefl
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/47687] [C++0x] Crash on a lambda returning a lambda (using std::function)
2011-02-10 19:53 [Bug c++/47687] New: [C++0x] Crash on a lambda returning a lambda (using std::function) vituscze at gmail dot com
@ 2011-02-11 18:59 ` redi at gcc dot gnu.org
2011-02-11 19:06 ` redi at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2011-02-11 18:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47687
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.02.11 18:56:05
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/47687] [C++0x] Crash on a lambda returning a lambda (using std::function)
2011-02-10 19:53 [Bug c++/47687] New: [C++0x] Crash on a lambda returning a lambda (using std::function) vituscze at gmail dot com
2011-02-11 18:59 ` [Bug c++/47687] " redi at gcc dot gnu.org
@ 2011-02-11 19:06 ` redi at gcc dot gnu.org
2011-05-27 15:00 ` jason at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2011-02-11 19:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47687
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-02-11 19:04:15 UTC ---
cc1plus goes into a loop and runs out of stack space
#471582 dependent_type_p (type=0x2aaaab1b2348) at
../../gcc-4.6-20110205/gcc/cp/pt.c:17918
#471583 0x00000000004da587 in dependent_type_p_r (type=0x2aaaab1b0348) at
../../gcc-4.6-20110205/gcc/cp/pt.c:17908
#471584 dependent_type_p (type=0x2aaaab1b0348) at
../../gcc-4.6-20110205/gcc/cp/pt.c:17944
#471585 dependent_type_p (type=0x2aaaab1b0348) at
../../gcc-4.6-20110205/gcc/cp/pt.c:17918
#471586 0x00000000004da3f0 in dependent_type_p_r (type=0x2aaaab1b2348) at
../../gcc-4.6-20110205/gcc/cp/pt.c:17836
#471587 dependent_type_p (type=0x2aaaab1b2348) at
../../gcc-4.6-20110205/gcc/cp/pt.c:17944
#471588 dependent_type_p (type=0x2aaaab1b2348) at
../../gcc-4.6-20110205/gcc/cp/pt.c:17918
#471589 0x00000000004da587 in dependent_type_p_r (type=0x2aaaab1b0348) at
../../gcc-4.6-20110205/gcc/cp/pt.c:17908
#471590 dependent_type_p (type=0x2aaaab1b0348) at
../../gcc-4.6-20110205/gcc/cp/pt.c:17944
#471591 dependent_type_p (type=0x2aaaab1b0348) at
../../gcc-4.6-20110205/gcc/cp/pt.c:17918
#471592 0x00000000004dad1e in any_dependent_template_arguments_p
(args=0x2aaaaafd6910) at ../../gcc-4.6-20110205/gcc/cp/pt.c:18487
#471593 0x00000000004dd2a8 in uses_template_parms (t=0x2aaaaafd6910) at
../../gcc-4.6-20110205/gcc/cp/pt.c:7417
#471594 0x00000000004e7d64 in lookup_template_class (d1=<value optimized out>,
arglist=0x2aaaaafd6910, in_decl=0x0, context=<value optimized out>,
entering_scope=0,
complain=0) at ../../gcc-4.6-20110205/gcc/cp/pt.c:6949
#471595 0x00000000004e9e31 in tsubst_aggr_type (t=0x2aaaaae6ddc8,
args=0x2aaaaafd68c0, complain=0, in_decl=0x0, entering_scope=0)
at ../../gcc-4.6-20110205/gcc/cp/pt.c:9185
#471596 0x00000000004f21fa in tsubst (t=0x2aaaaae6ddc8, args=0x2aaaaafd68c0,
complain=0, in_decl=0x0) at ../../gcc-4.6-20110205/gcc/cp/pt.c:10433
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/47687] [C++0x] Crash on a lambda returning a lambda (using std::function)
2011-02-10 19:53 [Bug c++/47687] New: [C++0x] Crash on a lambda returning a lambda (using std::function) vituscze at gmail dot com
2011-02-11 18:59 ` [Bug c++/47687] " redi at gcc dot gnu.org
2011-02-11 19:06 ` redi at gcc dot gnu.org
@ 2011-05-27 15:00 ` jason at gcc dot gnu.org
2011-05-27 17:25 ` jason at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-27 15:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47687
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/47687] [C++0x] Crash on a lambda returning a lambda (using std::function)
2011-02-10 19:53 [Bug c++/47687] New: [C++0x] Crash on a lambda returning a lambda (using std::function) vituscze at gmail dot com
` (2 preceding siblings ...)
2011-05-27 15:00 ` jason at gcc dot gnu.org
@ 2011-05-27 17:25 ` jason at gcc dot gnu.org
2011-05-27 19:35 ` jason at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-27 17:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47687
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |a71104 at gmail dot com
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-27 17:24:48 UTC ---
*** Bug 47212 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/47687] [C++0x] Crash on a lambda returning a lambda (using std::function)
2011-02-10 19:53 [Bug c++/47687] New: [C++0x] Crash on a lambda returning a lambda (using std::function) vituscze at gmail dot com
` (3 preceding siblings ...)
2011-05-27 17:25 ` jason at gcc dot gnu.org
@ 2011-05-27 19:35 ` jason at gcc dot gnu.org
2011-05-27 20:48 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-27 19:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47687
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-27 19:32:09 UTC ---
Author: jason
Date: Fri May 27 19:32:07 2011
New Revision: 174354
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174354
Log:
PR c++/47687
* pt.c (dependent_type_p_r): Avoid infinite recursion.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested4.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/47687] [C++0x] Crash on a lambda returning a lambda (using std::function)
2011-02-10 19:53 [Bug c++/47687] New: [C++0x] Crash on a lambda returning a lambda (using std::function) vituscze at gmail dot com
` (4 preceding siblings ...)
2011-05-27 19:35 ` jason at gcc dot gnu.org
@ 2011-05-27 20:48 ` jason at gcc dot gnu.org
2011-05-29 0:46 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-27 20:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47687
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-27 20:45:50 UTC ---
Fixed for 4.7.0.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/47687] [C++0x] Crash on a lambda returning a lambda (using std::function)
2011-02-10 19:53 [Bug c++/47687] New: [C++0x] Crash on a lambda returning a lambda (using std::function) vituscze at gmail dot com
` (5 preceding siblings ...)
2011-05-27 20:48 ` jason at gcc dot gnu.org
@ 2011-05-29 0:46 ` jason at gcc dot gnu.org
2011-10-19 17:26 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-29 0:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47687
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wb at fnal dot gov
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-29 00:43:57 UTC ---
*** Bug 45167 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/47687] [C++0x] Crash on a lambda returning a lambda (using std::function)
2011-02-10 19:53 [Bug c++/47687] New: [C++0x] Crash on a lambda returning a lambda (using std::function) vituscze at gmail dot com
` (6 preceding siblings ...)
2011-05-29 0:46 ` jason at gcc dot gnu.org
@ 2011-10-19 17:26 ` paolo.carlini at oracle dot com
2011-10-27 22:28 ` paolo.carlini at oracle dot com
2011-12-07 16:55 ` paolo.carlini at oracle dot com
9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-19 17:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47687
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yar at sibnet dot ru
--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-19 17:22:07 UTC ---
*** Bug 50791 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/47687] [C++0x] Crash on a lambda returning a lambda (using std::function)
2011-02-10 19:53 [Bug c++/47687] New: [C++0x] Crash on a lambda returning a lambda (using std::function) vituscze at gmail dot com
` (7 preceding siblings ...)
2011-10-19 17:26 ` paolo.carlini at oracle dot com
@ 2011-10-27 22:28 ` paolo.carlini at oracle dot com
2011-12-07 16:55 ` paolo.carlini at oracle dot com
9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-27 22:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47687
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amaru_cuba at hotmail dot
| |com
--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-27 22:27:54 UTC ---
*** Bug 50884 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/47687] [C++0x] Crash on a lambda returning a lambda (using std::function)
2011-02-10 19:53 [Bug c++/47687] New: [C++0x] Crash on a lambda returning a lambda (using std::function) vituscze at gmail dot com
` (8 preceding siblings ...)
2011-10-27 22:28 ` paolo.carlini at oracle dot com
@ 2011-12-07 16:55 ` paolo.carlini at oracle dot com
9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-12-07 16:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47687
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |doko at gcc dot gnu.org
--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-07 16:53:26 UTC ---
*** Bug 51395 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-12-07 16:55 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 19:53 [Bug c++/47687] New: [C++0x] Crash on a lambda returning a lambda (using std::function) vituscze at gmail dot com
2011-02-11 18:59 ` [Bug c++/47687] " redi at gcc dot gnu.org
2011-02-11 19:06 ` redi at gcc dot gnu.org
2011-05-27 15:00 ` jason at gcc dot gnu.org
2011-05-27 17:25 ` jason at gcc dot gnu.org
2011-05-27 19:35 ` jason at gcc dot gnu.org
2011-05-27 20:48 ` jason at gcc dot gnu.org
2011-05-29 0:46 ` jason at gcc dot gnu.org
2011-10-19 17:26 ` paolo.carlini at oracle dot com
2011-10-27 22:28 ` paolo.carlini at oracle dot com
2011-12-07 16:55 ` 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).