public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43281] New: [c++0x] ICE in nested lambda functions, in a special case
@ 2010-03-07 13:00 adam dot rak at streamnovation dot com
2010-03-08 2:37 ` [Bug c++/43281] [c++0x] ICE in nested lambda functions with invalid auto jason at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: adam dot rak at streamnovation dot com @ 2010-03-07 13:00 UTC (permalink / raw)
To: gcc-bugs
it resembles Bug 41896 but with the addition of line: auto val = val;
The code is legal but doesn't make any sense. In some rare cases which I
couldn't replicate simply, it went into an infinite mallo, consuming the whole
memory, instead of segfault.
float nested_lambda()
{
float val;
[val]()
{
auto val = val;
[val]()
{
};
};
}
g++: Internal error: Segmentation Fault (program cc1plus)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/rakadam/streamplusplus/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --enable-languages=c,c++ --program-suffix=-4.5
--prefix=/home/rakadam/streamplusplus/src/third_party/gcc-trunk/build_gcc/../../../../local
--enable-lto --disable-bootstrap --enable-gold
Thread model: posix
gcc version 4.5.0 20100306 (experimental) (GCC)
--
Summary: [c++0x] ICE in nested lambda functions, in a special
case
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: adam dot rak at streamnovation dot com
GCC build triplet: x86_64-unknown-linux
GCC host triplet: x86_64-unknown-linux
GCC target triplet: x86_64-unknown-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43281
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/43281] [c++0x] ICE in nested lambda functions with invalid auto
2010-03-07 13:00 [Bug c++/43281] New: [c++0x] ICE in nested lambda functions, in a special case adam dot rak at streamnovation dot com
@ 2010-03-08 2:37 ` jason at gcc dot gnu dot org
2010-03-08 4:27 ` [Bug c++/43281] [c++0x] ICE " jason at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-03-08 2:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jason at gcc dot gnu dot org 2010-03-08 02:37 -------
The code is ill-formed; specifically, the line
auto val = val;
violates 7.1.6.4/3: "The name of the object being declared shall not appear in
the initializer expression."
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Keywords| |ice-on-invalid-code
Last reconfirmed|0000-00-00 00:00:00 |2010-03-08 02:37:20
date| |
Summary|[c++0x] ICE in nested lambda|[c++0x] ICE in nested lambda
|functions, in a special case|functions with invalid auto
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43281
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/43281] [c++0x] ICE with invalid auto
2010-03-07 13:00 [Bug c++/43281] New: [c++0x] ICE in nested lambda functions, in a special case adam dot rak at streamnovation dot com
2010-03-08 2:37 ` [Bug c++/43281] [c++0x] ICE in nested lambda functions with invalid auto jason at gcc dot gnu dot org
@ 2010-03-08 4:27 ` jason at gcc dot gnu dot org
2010-03-22 20:39 ` jason at gcc dot gnu dot org
2010-03-22 20:50 ` jason at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-03-08 4:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jason at gcc dot gnu dot org 2010-03-08 04:27 -------
and indeed this testcase gets the same crash:
void f()
{
auto val = val;
}
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[c++0x] ICE in nested lambda|[c++0x] ICE with invalid
|functions with invalid auto |auto
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43281
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/43281] [c++0x] ICE with invalid auto
2010-03-07 13:00 [Bug c++/43281] New: [c++0x] ICE in nested lambda functions, in a special case adam dot rak at streamnovation dot com
2010-03-08 2:37 ` [Bug c++/43281] [c++0x] ICE in nested lambda functions with invalid auto jason at gcc dot gnu dot org
2010-03-08 4:27 ` [Bug c++/43281] [c++0x] ICE " jason at gcc dot gnu dot org
@ 2010-03-22 20:39 ` jason at gcc dot gnu dot org
2010-03-22 20:50 ` jason at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-03-22 20:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jason at gcc dot gnu dot org 2010-03-22 20:39 -------
Subject: Bug 43281
Author: jason
Date: Mon Mar 22 20:38:46 2010
New Revision: 157651
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157651
Log:
PR c++/43281
* pt.c (contains_auto_r): New fn.
(do_auto_deduction): Use it.
(tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/auto18.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43281
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/43281] [c++0x] ICE with invalid auto
2010-03-07 13:00 [Bug c++/43281] New: [c++0x] ICE in nested lambda functions, in a special case adam dot rak at streamnovation dot com
` (2 preceding siblings ...)
2010-03-22 20:39 ` jason at gcc dot gnu dot org
@ 2010-03-22 20:50 ` jason at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-03-22 20:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jason at gcc dot gnu dot org 2010-03-22 20:50 -------
Fixed.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43281
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <bug-43281-4@http.gcc.gnu.org/bugzilla/>]
end of thread, other threads:[~2010-10-17 12:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-07 13:00 [Bug c++/43281] New: [c++0x] ICE in nested lambda functions, in a special case adam dot rak at streamnovation dot com
2010-03-08 2:37 ` [Bug c++/43281] [c++0x] ICE in nested lambda functions with invalid auto jason at gcc dot gnu dot org
2010-03-08 4:27 ` [Bug c++/43281] [c++0x] ICE " jason at gcc dot gnu dot org
2010-03-22 20:39 ` jason at gcc dot gnu dot org
2010-03-22 20:50 ` jason at gcc dot gnu dot org
[not found] <bug-43281-4@http.gcc.gnu.org/bugzilla/>
2010-10-17 12:10 ` aaz at althenia dot net
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).