public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60053] New: [c++1y] ICE with auto as member template function parameter
@ 2014-02-04 7:21 reichelt at gcc dot gnu.org
2014-02-21 7:48 ` [Bug c++/60053] " abutcher at gcc dot gnu.org
2014-02-21 21:15 ` reichelt at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-04 7:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60053
Bug ID: 60053
Summary: [c++1y] ICE with auto as member template function
parameter
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 valid code snippet (compiled with "-std=c++1y") triggers an
ICE on trunk:
===============================================
struct A
{
void foo(auto);
};
void A::foo(auto) {}
template<typename> struct B
{
template<typename T> void bar(auto);
};
===============================================
bug.cc:11:2: internal compiler error: in pop_binding, at cp/name-lookup.c:375};
^
0x77d96a pop_binding(tree_node*, tree_node*)
../../gcc/gcc/cp/name-lookup.c:375
0x5c3027 poplevel(int, int, int)
../../gcc/gcc/cp/decl.c:744
0x5fce98 end_template_decl()
../../gcc/gcc/cp/pt.c:3799
0x6cb60f cp_parser_template_declaration_after_export
../../gcc/gcc/cp/parser.c:22938
0x6d69b9 cp_parser_declaration
../../gcc/gcc/cp/parser.c:10947
0x6d54a8 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10869
0x6d6d8a cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4014
0x6d6d8a c_parse_file()
../../gcc/gcc/cp/parser.c:31528
0x7f66d3 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1060
Please submit a full bug report, [etc.]
If I just leave out the name "T" of the template parameter, the code compiles
fine. This is probably related to PR60052.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/60053] [c++1y] ICE with auto as member template function parameter
2014-02-04 7:21 [Bug c++/60053] New: [c++1y] ICE with auto as member template function parameter reichelt at gcc dot gnu.org
@ 2014-02-21 7:48 ` abutcher at gcc dot gnu.org
2014-02-21 21:15 ` reichelt at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: abutcher at gcc dot gnu.org @ 2014-02-21 7:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60053
--- Comment #1 from Adam Butcher <abutcher at gcc dot gnu.org> ---
Author: abutcher
Date: Fri Feb 21 07:47:55 2014
New Revision: 207980
URL: http://gcc.gnu.org/viewcvs?rev=207980&root=gcc&view=rev
Log:
Fix PR c++/60052 and PR c++/60053.
PR c++/60052
PR c++/60053
* parser.c (cp_parser_parameter_declaration_list): Correctly reset
implicit_template_scope upon leaving an out-of-line generic member
function definition.
PR c++/60052
PR c++/60053
* g++.dg/cpp1y/pr60052.C: New testcase.
* g++.dg/cpp1y/pr60053.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/cpp1y/pr60052.C
trunk/gcc/testsuite/g++.dg/cpp1y/pr60053.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/60053] [c++1y] ICE with auto as member template function parameter
2014-02-04 7:21 [Bug c++/60053] New: [c++1y] ICE with auto as member template function parameter reichelt at gcc dot gnu.org
2014-02-21 7:48 ` [Bug c++/60053] " abutcher at gcc dot gnu.org
@ 2014-02-21 21:15 ` reichelt at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-21 21:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60053
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |4.9.0
--- 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:[~2014-02-21 21:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-04 7:21 [Bug c++/60053] New: [c++1y] ICE with auto as member template function parameter reichelt at gcc dot gnu.org
2014-02-21 7:48 ` [Bug c++/60053] " abutcher at gcc dot gnu.org
2014-02-21 21:15 ` 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).