public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58568] New: [4.8/4.9 Regression] ICE with lambda in invalid template variable definition
@ 2013-09-28 20:08 reichelt at gcc dot gnu.org
2013-09-28 20:32 ` [Bug c++/58568] [4.8/4.9 Regression] [c++11] " paolo.carlini at oracle dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-09-28 20:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58568
Bug ID: 58568
Summary: [4.8/4.9 Regression] ICE with lambda in invalid
template variable definition
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
The following invalid code snippet (compiled with "-std=c++0x") triggers an ICE
since GCC 4.8.1:
==============================================================
template<int> struct A
{
static const int i;
template<int N> const int A<N>::i = []{ return 0; }();
};
==============================================================
bug.cc:4:40: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in begin_lambda_type, at cp/lambda.c:144
template<int N> const int A<N>::i = []{ return 0; }();
^
0xcda4a9 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
../../gcc/gcc/tree.c:9227
0x722a3a tree_class_check
../../gcc/gcc/tree.h:2732
0x722a3a begin_lambda_type(tree_node*)
../../gcc/gcc/cp/lambda.c:144
0x641630 cp_parser_lambda_expression
../../gcc/gcc/cp/parser.c:8542
0x641630 cp_parser_primary_expression
../../gcc/gcc/cp/parser.c:4230
0x643970 cp_parser_postfix_expression
../../gcc/gcc/cp/parser.c:5814
0x64615d cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:7009
0x646d3f cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:7701
0x6471ff cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:7937
0x647656 cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:7987
0x647656 cp_parser_constant_expression
../../gcc/gcc/cp/parser.c:8197
0x653601 cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16520
0x653fb4 cp_parser_single_declaration
../../gcc/gcc/cp/parser.c:22652
0x656b80 cp_parser_template_declaration_after_export
../../gcc/gcc/cp/parser.c:22454
0x636882 cp_parser_member_declaration
../../gcc/gcc/cp/parser.c:19703
0x63787e cp_parser_member_specification_opt
../../gcc/gcc/cp/parser.c:19630
0x63787e cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:18885
0x63a220 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:19101
0x63a220 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:14080
0x64f739 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:11328
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58568] [4.8/4.9 Regression] [c++11] ICE with lambda in invalid template variable definition
2013-09-28 20:08 [Bug c++/58568] New: [4.8/4.9 Regression] ICE with lambda in invalid template variable definition reichelt at gcc dot gnu.org
@ 2013-09-28 20:32 ` paolo.carlini at oracle dot com
2013-09-30 6:23 ` mpolacek at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-28 20:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58568
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.8/4.9 Regression] |[4.8/4.9 Regression]
|[c++0x] ICE with lambda in |[c++11] ICE with lambda in
|invalid template variable |invalid template variable
|definition |definition
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Please don't refer anymore to c++0x/C++0x, by now it's legacy.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58568] [4.8/4.9 Regression] [c++11] ICE with lambda in invalid template variable definition
2013-09-28 20:08 [Bug c++/58568] New: [4.8/4.9 Regression] ICE with lambda in invalid template variable definition reichelt at gcc dot gnu.org
2013-09-28 20:32 ` [Bug c++/58568] [4.8/4.9 Regression] [c++11] " paolo.carlini at oracle dot com
@ 2013-09-30 6:23 ` mpolacek at gcc dot gnu.org
2013-10-08 0:21 ` paolo.carlini at oracle dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-09-30 6:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58568
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-09-30
CC| |jason at gcc dot gnu.org,
| |mpolacek at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r196742.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58568] [4.8/4.9 Regression] [c++11] ICE with lambda in invalid template variable definition
2013-09-28 20:08 [Bug c++/58568] New: [4.8/4.9 Regression] ICE with lambda in invalid template variable definition reichelt at gcc dot gnu.org
2013-09-28 20:32 ` [Bug c++/58568] [4.8/4.9 Regression] [c++11] " paolo.carlini at oracle dot com
2013-09-30 6:23 ` mpolacek at gcc dot gnu.org
@ 2013-10-08 0:21 ` paolo.carlini at oracle dot com
2013-10-08 21:59 ` paolo at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-08 0:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58568
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58568] [4.8/4.9 Regression] [c++11] ICE with lambda in invalid template variable definition
2013-09-28 20:08 [Bug c++/58568] New: [4.8/4.9 Regression] ICE with lambda in invalid template variable definition reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2013-10-08 0:21 ` paolo.carlini at oracle dot com
@ 2013-10-08 21:59 ` paolo at gcc dot gnu.org
2013-10-08 22:29 ` paolo at gcc dot gnu.org
2013-10-08 22:30 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo at gcc dot gnu.org @ 2013-10-08 21:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58568
--- Comment #4 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Tue Oct 8 21:58:58 2013
New Revision: 203289
URL: http://gcc.gnu.org/viewcvs?rev=203289&root=gcc&view=rev
Log:
/cp
2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58568
* lambda.c (begin_lambda_type): Check return value of xref_tag
for error_mark_node; tidy.
* decl.c (grokdeclarator): Tweak error message.
/testsuite
2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58568
* g++.dg/cpp0x/lambda/lambda-ice10.C: New.
* g++.old-deja/g++.mike/misc9.C: Adjust.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice10.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/cp/lambda.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.old-deja/g++.mike/misc9.C
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58568] [4.8/4.9 Regression] [c++11] ICE with lambda in invalid template variable definition
2013-09-28 20:08 [Bug c++/58568] New: [4.8/4.9 Regression] ICE with lambda in invalid template variable definition reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2013-10-08 21:59 ` paolo at gcc dot gnu.org
@ 2013-10-08 22:29 ` paolo at gcc dot gnu.org
2013-10-08 22:30 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo at gcc dot gnu.org @ 2013-10-08 22:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58568
--- Comment #5 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Tue Oct 8 22:29:49 2013
New Revision: 203290
URL: http://gcc.gnu.org/viewcvs?rev=203290&root=gcc&view=rev
Log:
/cp
2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58568
* semantics.c (begin_lambda_type): Check return value of xref_tag
for error_mark_node; tidy.
* decl.c (grokdeclarator): Tweak error message.
/testsuite
2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58568
* g++.dg/cpp0x/lambda/lambda-ice10.C: New.
* g++.old-deja/g++.mike/misc9.C: Adjust.
Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice10.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/decl.c
branches/gcc-4_8-branch/gcc/cp/semantics.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
branches/gcc-4_8-branch/gcc/testsuite/g++.old-deja/g++.mike/misc9.C
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/58568] [4.8/4.9 Regression] [c++11] ICE with lambda in invalid template variable definition
2013-09-28 20:08 [Bug c++/58568] New: [4.8/4.9 Regression] ICE with lambda in invalid template variable definition reichelt at gcc dot gnu.org
` (4 preceding siblings ...)
2013-10-08 22:29 ` paolo at gcc dot gnu.org
@ 2013-10-08 22:30 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-08 22:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58568
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed for 4.8.2 and 4.9.0.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-10-08 22:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-28 20:08 [Bug c++/58568] New: [4.8/4.9 Regression] ICE with lambda in invalid template variable definition reichelt at gcc dot gnu.org
2013-09-28 20:32 ` [Bug c++/58568] [4.8/4.9 Regression] [c++11] " paolo.carlini at oracle dot com
2013-09-30 6:23 ` mpolacek at gcc dot gnu.org
2013-10-08 0:21 ` paolo.carlini at oracle dot com
2013-10-08 21:59 ` paolo at gcc dot gnu.org
2013-10-08 22:29 ` paolo at gcc dot gnu.org
2013-10-08 22:30 ` 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).