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.

Reply via email to