public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60311] New: [c++1y] ICE with pointer-to-function with auto parameter
@ 2014-02-22 1:15 reichelt at gcc dot gnu.org
2014-02-25 6:45 ` [Bug c++/60311] " abutcher at gcc dot gnu.org
2014-02-25 21:22 ` reichelt at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-22 1:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60311
Bug ID: 60311
Summary: [c++1y] ICE with pointer-to-function with auto
parameter
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-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 invalid(?) line of code (compiled with "-std=c++1y") triggers an
ICE on trunk:
==========================================
template<void(*)(auto)> struct A {};
==========================================
bug.cc:1:17: internal compiler error: in synthesize_implicit_template_parm, at
cp/parser.c:31926
template<void(*)(auto)> struct A {};
^
0x6d01da synthesize_implicit_template_parm
../../gcc/gcc/cp/parser.c:31926
0x6d01da cp_parser_simple_type_specifier
../../gcc/gcc/cp/parser.c:14507
0x6ad60d cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:14383
0x6c6ce0 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:11547
0x6c92a7 cp_parser_parameter_declaration
../../gcc/gcc/cp/parser.c:18446
0x6ca681 cp_parser_parameter_declaration_list
../../gcc/gcc/cp/parser.c:18262
0x6cacf2 cp_parser_parameter_declaration_clause
../../gcc/gcc/cp/parser.c:18183
0x6c14b5 cp_parser_direct_declarator
../../gcc/gcc/cp/parser.c:17075
0x6c14b5 cp_parser_declarator
../../gcc/gcc/cp/parser.c:16946
0x6c9361 cp_parser_parameter_declaration
../../gcc/gcc/cp/parser.c:18505
0x6c9b2b cp_parser_template_parameter
../../gcc/gcc/cp/parser.c:12984
0x6c9b2b cp_parser_template_parameter_list
../../gcc/gcc/cp/parser.c:12887
0x6ccdc9 cp_parser_template_declaration_after_export
../../gcc/gcc/cp/parser.c:22896
0x6d8269 cp_parser_declaration
../../gcc/gcc/cp/parser.c:10947
0x6d6d58 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10869
0x6d85fa cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4014
0x6d85fa c_parse_file()
../../gcc/gcc/cp/parser.c:31551
0x7f76e3 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1060
Please submit a full bug report, [etc.]
Adam, you might want to have a look at that one.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/60311] [c++1y] ICE with pointer-to-function with auto parameter
2014-02-22 1:15 [Bug c++/60311] New: [c++1y] ICE with pointer-to-function with auto parameter reichelt at gcc dot gnu.org
@ 2014-02-25 6:45 ` abutcher at gcc dot gnu.org
2014-02-25 21:22 ` reichelt at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: abutcher at gcc dot gnu.org @ 2014-02-25 6:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60311
--- Comment #1 from Adam Butcher <abutcher at gcc dot gnu.org> ---
Author: abutcher
Date: Tue Feb 25 06:44:53 2014
New Revision: 208111
URL: http://gcc.gnu.org/viewcvs?rev=208111&root=gcc&view=rev
Log:
Fix PR c++/60311.
PR c++/60311
* parser.c (function_being_declared_is_template_p): Return false when
processing a template parameter list.
(cp_parser_parameter_declaration_clause): Don't set
auto_is_implicit_function_template_parm_p when processing a
template parameter list.
PR c++/60311
* g++.dg/cpp1y/pr60311.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/cpp1y/pr60311.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++/60311] [c++1y] ICE with pointer-to-function with auto parameter
2014-02-22 1:15 [Bug c++/60311] New: [c++1y] ICE with pointer-to-function with auto parameter reichelt at gcc dot gnu.org
2014-02-25 6:45 ` [Bug c++/60311] " abutcher at gcc dot gnu.org
@ 2014-02-25 21:22 ` reichelt at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-25 21:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60311
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-25 21:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-22 1:15 [Bug c++/60311] New: [c++1y] ICE with pointer-to-function with auto parameter reichelt at gcc dot gnu.org
2014-02-25 6:45 ` [Bug c++/60311] " abutcher at gcc dot gnu.org
2014-02-25 21:22 ` 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).