public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60390] New: [c++1y] ICE with declaring function with auto parameter as friend
@ 2014-03-02 21:31 reichelt at gcc dot gnu.org
2014-03-15 21:18 ` [Bug c++/60390] " abutcher at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-03-02 21:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60390
Bug ID: 60390
Summary: [c++1y] ICE with declaring function with auto
parameter as friend
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
CC: abutcher at gcc dot gnu.org
The following valid code snippet (compiled with "-std=c++1y") triggers
an ICE on trunk:
===========================================
struct A
{
void foo(auto);
};
struct B
{
friend void A::foo(auto);
};
===========================================
bug.cc:8:26: internal compiler error: in poplevel_class, at
cp/name-lookup.c:2951
friend void A::foo(auto);
^
0x783a07 poplevel_class()
../../gcc/gcc/cp/name-lookup.c:2951
0x667d28 popclass()
../../gcc/gcc/cp/class.c:7129
0x66818a pop_nested_class()
../../gcc/gcc/cp/class.c:7275
0x6c2cf1 cp_parser_direct_declarator
../../gcc/gcc/cp/parser.c:17479
0x6c2cf1 cp_parser_declarator
../../gcc/gcc/cp/parser.c:16947
0x6ac38d cp_parser_member_declaration
../../gcc/gcc/cp/parser.c:20353
0x6afa74 cp_parser_member_specification_opt
../../gcc/gcc/cp/parser.c:20034
0x6afa74 cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:19268
0x6afa74 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:19495
0x6afa74 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:14305
0x6c8f70 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:11547
0x6cfb49 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:11137
0x6b2ff3 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:11086
0x6da2b2 cp_parser_declaration
../../gcc/gcc/cp/parser.c:10983
0x6d8fa8 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10869
0x6da85a cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4014
0x6da85a c_parse_file()
../../gcc/gcc/cp/parser.c:31595
0x7f9f53 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1060
Please submit a full bug report, [etc.]
This is similar to PR60064.
Adam, you might want to have a look.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/60390] [c++1y] ICE with declaring function with auto parameter as friend
2014-03-02 21:31 [Bug c++/60390] New: [c++1y] ICE with declaring function with auto parameter as friend reichelt at gcc dot gnu.org
@ 2014-03-15 21:18 ` abutcher at gcc dot gnu.org
2014-03-17 20:03 ` abutcher at gcc dot gnu.org
2014-03-17 20:06 ` abutcher at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: abutcher at gcc dot gnu.org @ 2014-03-15 21:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60390
Adam Butcher <abutcher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-03-15
Assignee|unassigned at gcc dot gnu.org |abutcher at gcc dot gnu.org
Target Milestone|--- |4.9.0
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/60390] [c++1y] ICE with declaring function with auto parameter as friend
2014-03-02 21:31 [Bug c++/60390] New: [c++1y] ICE with declaring function with auto parameter as friend reichelt at gcc dot gnu.org
2014-03-15 21:18 ` [Bug c++/60390] " abutcher at gcc dot gnu.org
@ 2014-03-17 20:03 ` abutcher at gcc dot gnu.org
2014-03-17 20:06 ` abutcher at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: abutcher at gcc dot gnu.org @ 2014-03-17 20:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60390
--- Comment #1 from Adam Butcher <abutcher at gcc dot gnu.org> ---
Author: abutcher
Date: Mon Mar 17 20:02:26 2014
New Revision: 208625
URL: http://gcc.gnu.org/viewcvs?rev=208625&root=gcc&view=rev
Log:
Fix PR c++/60390
PR c++/60390
* parser.c (cp_parser_member_declaration): Don't allow
finish_fully_implicit_template to consider friend declarations to be
class member templates.
(synthesize_implicit_template_parm): Handling winding back through class
scope to the class being defined in order to inject a template argument
list.
PR c++/60390
* g++.dg/cpp1y/pr60390.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/cpp1y/pr60390.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/60390] [c++1y] ICE with declaring function with auto parameter as friend
2014-03-02 21:31 [Bug c++/60390] New: [c++1y] ICE with declaring function with auto parameter as friend reichelt at gcc dot gnu.org
2014-03-15 21:18 ` [Bug c++/60390] " abutcher at gcc dot gnu.org
2014-03-17 20:03 ` abutcher at gcc dot gnu.org
@ 2014-03-17 20:06 ` abutcher at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: abutcher at gcc dot gnu.org @ 2014-03-17 20:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60390
Adam Butcher <abutcher at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Adam Butcher <abutcher at gcc dot gnu.org> ---
Fixed in 4.9.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-17 20:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-02 21:31 [Bug c++/60390] New: [c++1y] ICE with declaring function with auto parameter as friend reichelt at gcc dot gnu.org
2014-03-15 21:18 ` [Bug c++/60390] " abutcher at gcc dot gnu.org
2014-03-17 20:03 ` abutcher at gcc dot gnu.org
2014-03-17 20:06 ` abutcher 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).