public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59112] New: [c++1y] ICE using auto as parameter in local class
@ 2013-11-13 14:20 reichelt at gcc dot gnu.org
2013-11-25 7:44 ` [Bug c++/59112] " abutcher at gcc dot gnu.org
2013-11-25 19:58 ` reichelt at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-11-13 14:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59112
Bug ID: 59112
Summary: [c++1y] ICE using auto as parameter in local class
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++1y") triggers an
ICE on trunk:
====================
void foo()
{
struct A
{
A(auto) {}
};
}
====================
bug.cc: In function 'void foo()':
bug.cc:5:14: internal compiler error: in check_member_template, at
cp/decl2.c:505
A(auto) {}
^
0x61e8e9 check_member_template(tree_node*)
../../gcc/gcc/cp/decl2.c:505
0x59550b finish_member_template_decl(tree_node*)
../../gcc/gcc/cp/pt.c:291
0x63dd49 finish_fully_implicit_template
../../gcc/gcc/cp/parser.c:31363
0x66969e cp_parser_member_declaration
../../gcc/gcc/cp/parser.c:20287
0x6492ad cp_parser_member_specification_opt
../../gcc/gcc/cp/parser.c:19850
0x6492ad cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:19094
0x6492ad cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:19321
0x6492ad cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:14215
0x661b57 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:11460
0x6681d9 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:11050
0x64c7b0 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10999
0x64d8d3 cp_parser_declaration_statement
../../gcc/gcc/cp/parser.c:10646
0x64df47 cp_parser_statement
../../gcc/gcc/cp/parser.c:9387
0x64ec49 cp_parser_statement_seq_opt
../../gcc/gcc/cp/parser.c:9665
0x64edbe cp_parser_compound_statement
../../gcc/gcc/cp/parser.c:9619
0x66248b cp_parser_function_body
../../gcc/gcc/cp/parser.c:18525
0x66248b cp_parser_ctor_initializer_opt_and_function_body
../../gcc/gcc/cp/parser.c:18561
0x6662c3 cp_parser_function_definition_after_declarator
../../gcc/gcc/cp/parser.c:22593
0x667102 cp_parser_function_definition_from_specifiers_and_declarator
../../gcc/gcc/cp/parser.c:22505
0x667102 cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16506
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/59112] [c++1y] ICE using auto as parameter in local class
2013-11-13 14:20 [Bug c++/59112] New: [c++1y] ICE using auto as parameter in local class reichelt at gcc dot gnu.org
@ 2013-11-25 7:44 ` abutcher at gcc dot gnu.org
2013-11-25 19:58 ` reichelt at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: abutcher at gcc dot gnu.org @ 2013-11-25 7:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59112
--- Comment #1 from abutcher at gcc dot gnu.org ---
Author: abutcher
Date: Mon Nov 25 07:43:55 2013
New Revision: 205343
URL: http://gcc.gnu.org/viewcvs?rev=205343&root=gcc&view=rev
Log:
Disallow implicit function templates in local functions unless defining a
lambda.
gcc/cp/
PR c++/59112
PR c++/59113
* parser.c (cp_parser_parameter_declaration_clause): Disallow implicit
function templates in local functions unless defining a lambda.
gcc/testsuite/
PR c++/59112
PR c++/59113
g++.dg/cpp1y/pr58533.C: Updated testcase.
g++.dg/cpp1y/pr59112.C: New testcase.
g++.dg/cpp1y/pr59113.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/cpp1y/pr59112.C
trunk/gcc/testsuite/g++.dg/cpp1y/pr59113.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp1y/pr58533.C
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/59112] [c++1y] ICE using auto as parameter in local class
2013-11-13 14:20 [Bug c++/59112] New: [c++1y] ICE using auto as parameter in local class reichelt at gcc dot gnu.org
2013-11-25 7:44 ` [Bug c++/59112] " abutcher at gcc dot gnu.org
@ 2013-11-25 19:58 ` reichelt at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-11-25 19:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59112
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Fixed by Adam's patch.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-25 19:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-13 14:20 [Bug c++/59112] New: [c++1y] ICE using auto as parameter in local class reichelt at gcc dot gnu.org
2013-11-25 7:44 ` [Bug c++/59112] " abutcher at gcc dot gnu.org
2013-11-25 19:58 ` reichelt 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).