public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/44366] New: g++ crashes when declaring a lambda expression using a typedef'd decltype.
@ 2010-06-01 14:17 LindleyF at gmail dot com
2010-06-01 14:20 ` [Bug c++/44366] " LindleyF at gmail dot com
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: LindleyF at gmail dot com @ 2010-06-01 14:17 UTC (permalink / raw)
To: gcc-bugs
In the minimal example (to be attached), g++ crashes with a "please submit bug
report" message.
The goal of the original code was to provide a generic multi-label connected
component algorithm. Therefore, I wished to output a label along with each
Component of the same type as the input data 2d array----decltype(data[0][0]).
However, when I added a lambda expression as part of operating on something
related to this type, g++ began crashing during compile.
I realize that in some cases decltype(data[0][0]) may have a reference type so
this code may be invalid; however, the compiler still should not crash, but
simply report an error.
--
Summary: g++ crashes when declaring a lambda expression using a
typedef'd decltype.
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: LindleyF at gmail dot com
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44366
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/44366] g++ crashes when declaring a lambda expression using a typedef'd decltype.
2010-06-01 14:17 [Bug c++/44366] New: g++ crashes when declaring a lambda expression using a typedef'd decltype LindleyF at gmail dot com
@ 2010-06-01 14:20 ` LindleyF at gmail dot com
2010-06-01 14:21 ` LindleyF at gmail dot com
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: LindleyF at gmail dot com @ 2010-06-01 14:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from LindleyF at gmail dot com 2010-06-01 14:20 -------
Created an attachment (id=20796)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20796&action=view)
g++ -std=c++0x -o test2 test2.cpp -g -save-temps -v &> gcclog.txt
Build log generated by
g++ -std=c++0x -o test2 test2.cpp -g -save-temps -v &> gcclog.txt
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44366
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/44366] g++ crashes when declaring a lambda expression using a typedef'd decltype.
2010-06-01 14:17 [Bug c++/44366] New: g++ crashes when declaring a lambda expression using a typedef'd decltype LindleyF at gmail dot com
2010-06-01 14:20 ` [Bug c++/44366] " LindleyF at gmail dot com
@ 2010-06-01 14:21 ` LindleyF at gmail dot com
2010-06-01 14:23 ` LindleyF at gmail dot com
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: LindleyF at gmail dot com @ 2010-06-01 14:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from LindleyF at gmail dot com 2010-06-01 14:20 -------
Created an attachment (id=20797)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20797&action=view)
Preprocessed file
Preprocessor output for the small test case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44366
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/44366] g++ crashes when declaring a lambda expression using a typedef'd decltype.
2010-06-01 14:17 [Bug c++/44366] New: g++ crashes when declaring a lambda expression using a typedef'd decltype LindleyF at gmail dot com
2010-06-01 14:20 ` [Bug c++/44366] " LindleyF at gmail dot com
2010-06-01 14:21 ` LindleyF at gmail dot com
@ 2010-06-01 14:23 ` LindleyF at gmail dot com
2010-06-01 17:05 ` paolo dot carlini at oracle dot com
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: LindleyF at gmail dot com @ 2010-06-01 14:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from LindleyF at gmail dot com 2010-06-01 14:22 -------
Created an attachment (id=20798)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20798&action=view)
Small test case
Small test case file.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44366
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/44366] g++ crashes when declaring a lambda expression using a typedef'd decltype.
2010-06-01 14:17 [Bug c++/44366] New: g++ crashes when declaring a lambda expression using a typedef'd decltype LindleyF at gmail dot com
` (2 preceding siblings ...)
2010-06-01 14:23 ` LindleyF at gmail dot com
@ 2010-06-01 17:05 ` paolo dot carlini at oracle dot com
2010-06-03 16:40 ` [Bug c++/44366] [C++0x] " paolo dot carlini at oracle dot com
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-06-01 17:05 UTC (permalink / raw)
To: gcc-bugs
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-06-01 17:04:39
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44366
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/44366] [C++0x] g++ crashes when declaring a lambda expression using a typedef'd decltype.
2010-06-01 14:17 [Bug c++/44366] New: g++ crashes when declaring a lambda expression using a typedef'd decltype LindleyF at gmail dot com
` (3 preceding siblings ...)
2010-06-01 17:05 ` paolo dot carlini at oracle dot com
@ 2010-06-03 16:40 ` paolo dot carlini at oracle dot com
2010-06-07 23:58 ` jason at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-06-03 16:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from paolo dot carlini at oracle dot com 2010-06-03 16:40 -------
Let's CC Jason...
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44366
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/44366] [C++0x] g++ crashes when declaring a lambda expression using a typedef'd decltype.
2010-06-01 14:17 [Bug c++/44366] New: g++ crashes when declaring a lambda expression using a typedef'd decltype LindleyF at gmail dot com
` (4 preceding siblings ...)
2010-06-03 16:40 ` [Bug c++/44366] [C++0x] " paolo dot carlini at oracle dot com
@ 2010-06-07 23:58 ` jason at gcc dot gnu dot org
2010-06-08 0:08 ` jason at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-06-07 23:58 UTC (permalink / raw)
To: gcc-bugs
--
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|NEW |ASSIGNED
Last reconfirmed|2010-06-01 17:04:39 |2010-06-07 23:57:51
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44366
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/44366] [C++0x] g++ crashes when declaring a lambda expression using a typedef'd decltype.
2010-06-01 14:17 [Bug c++/44366] New: g++ crashes when declaring a lambda expression using a typedef'd decltype LindleyF at gmail dot com
` (5 preceding siblings ...)
2010-06-07 23:58 ` jason at gcc dot gnu dot org
@ 2010-06-08 0:08 ` jason at gcc dot gnu dot org
2010-06-08 4:34 ` jason at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-06-08 0:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jason at gcc dot gnu dot org 2010-06-08 00:07 -------
This actually isn't lambda-specific. The same crash happens with
template <typename T>
void f(T t, decltype(*t))
{
struct A { void g() { foo; } };
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44366
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/44366] [C++0x] g++ crashes when declaring a lambda expression using a typedef'd decltype.
2010-06-01 14:17 [Bug c++/44366] New: g++ crashes when declaring a lambda expression using a typedef'd decltype LindleyF at gmail dot com
` (6 preceding siblings ...)
2010-06-08 0:08 ` jason at gcc dot gnu dot org
@ 2010-06-08 4:34 ` jason at gcc dot gnu dot org
2010-06-08 4:34 ` jason at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-06-08 4:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jason at gcc dot gnu dot org 2010-06-08 04:34 -------
Subject: Bug 44366
Author: jason
Date: Tue Jun 8 04:34:20 2010
New Revision: 160421
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160421
Log:
PR c++/44366
* error.c (dump_simple_decl): Don't print the scope of a
PARM_DECL.
Added:
branches/gcc-4_5-branch/gcc/testsuite/g++.dg/cpp0x/decltype23.C
Modified:
branches/gcc-4_5-branch/gcc/cp/ChangeLog
branches/gcc-4_5-branch/gcc/cp/error.c
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44366
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/44366] [C++0x] g++ crashes when declaring a lambda expression using a typedef'd decltype.
2010-06-01 14:17 [Bug c++/44366] New: g++ crashes when declaring a lambda expression using a typedef'd decltype LindleyF at gmail dot com
` (7 preceding siblings ...)
2010-06-08 4:34 ` jason at gcc dot gnu dot org
@ 2010-06-08 4:34 ` jason at gcc dot gnu dot org
2010-06-08 4:38 ` jason at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-06-08 4:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jason at gcc dot gnu dot org 2010-06-08 04:34 -------
Subject: Bug 44366
Author: jason
Date: Tue Jun 8 04:33:50 2010
New Revision: 160420
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160420
Log:
PR c++/44366
* error.c (dump_parameters): Mask out TFF_SCOPE.
(dump_simple_decl): Don't print the scope of a PARM_DECL.
(dump_scope): Remove no-op mask.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/decltype23.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/error.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44366
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/44366] [C++0x] g++ crashes when declaring a lambda expression using a typedef'd decltype.
2010-06-01 14:17 [Bug c++/44366] New: g++ crashes when declaring a lambda expression using a typedef'd decltype LindleyF at gmail dot com
` (8 preceding siblings ...)
2010-06-08 4:34 ` jason at gcc dot gnu dot org
@ 2010-06-08 4:38 ` jason at gcc dot gnu dot org
2010-06-08 4:38 ` jason at gcc dot gnu dot org
2010-06-09 15:12 ` jason at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-06-08 4:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jason at gcc dot gnu dot org 2010-06-08 04:37 -------
Or even:
template <typename T>
void f(T t, int(*)[sizeof(t)])
{
struct A { void g() {
foo;
} };
}
which makes this a regression against 3.2.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44366
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/44366] [C++0x] g++ crashes when declaring a lambda expression using a typedef'd decltype.
2010-06-01 14:17 [Bug c++/44366] New: g++ crashes when declaring a lambda expression using a typedef'd decltype LindleyF at gmail dot com
` (9 preceding siblings ...)
2010-06-08 4:38 ` jason at gcc dot gnu dot org
@ 2010-06-08 4:38 ` jason at gcc dot gnu dot org
2010-06-09 15:12 ` jason at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-06-08 4:38 UTC (permalink / raw)
To: gcc-bugs
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.5.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44366
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/44366] [C++0x] g++ crashes when declaring a lambda expression using a typedef'd decltype.
2010-06-01 14:17 [Bug c++/44366] New: g++ crashes when declaring a lambda expression using a typedef'd decltype LindleyF at gmail dot com
` (10 preceding siblings ...)
2010-06-08 4:38 ` jason at gcc dot gnu dot org
@ 2010-06-09 15:12 ` jason at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-06-09 15:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jason at gcc dot gnu dot org 2010-06-09 15:12 -------
Subject: Bug 44366
Author: jason
Date: Wed Jun 9 15:11:42 2010
New Revision: 160483
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160483
Log:
PR c++/44366
* g++.dg/cpp0x/decltype23.C: Move to...
* g++.dg/diagnostic/parm1.C: ...here, and remove decltype.
Added:
trunk/gcc/testsuite/g++.dg/diagnostic/
trunk/gcc/testsuite/g++.dg/diagnostic/parm1.C
- copied, changed from r160478,
trunk/gcc/testsuite/g++.dg/cpp0x/decltype23.C
Removed:
trunk/gcc/testsuite/g++.dg/cpp0x/decltype23.C
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44366
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2010-06-09 15:12 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-01 14:17 [Bug c++/44366] New: g++ crashes when declaring a lambda expression using a typedef'd decltype LindleyF at gmail dot com
2010-06-01 14:20 ` [Bug c++/44366] " LindleyF at gmail dot com
2010-06-01 14:21 ` LindleyF at gmail dot com
2010-06-01 14:23 ` LindleyF at gmail dot com
2010-06-01 17:05 ` paolo dot carlini at oracle dot com
2010-06-03 16:40 ` [Bug c++/44366] [C++0x] " paolo dot carlini at oracle dot com
2010-06-07 23:58 ` jason at gcc dot gnu dot org
2010-06-08 0:08 ` jason at gcc dot gnu dot org
2010-06-08 4:34 ` jason at gcc dot gnu dot org
2010-06-08 4:34 ` jason at gcc dot gnu dot org
2010-06-08 4:38 ` jason at gcc dot gnu dot org
2010-06-08 4:38 ` jason at gcc dot gnu dot org
2010-06-09 15:12 ` jason at gcc dot gnu dot 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).