This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/79525] New: [c++1y] ICE with auto as function parameter


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79525

            Bug ID: 79525
           Summary: [c++1y] ICE with auto as function parameter
           Product: gcc
           Version: 7.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
  Target Milestone: ---

The following invalid code snippet triggers an ICE since the introduction
of auto as function parameter (GCC 4.9.0):

===================================
template<typename> struct A {};

struct B : A<void(auto)>
{
  B();
};
===================================

bug.cc:5:5: internal compiler error: in poplevel, at cp/decl.c:568
   B();
     ^
0x567483 poplevel(int, int, int)
        ../../gcc/gcc/cp/decl.c:568
0x5a1138 end_template_decl()
        ../../gcc/gcc/cp/pt.c:3795
0x6464d1 finish_fully_implicit_template
        ../../gcc/gcc/cp/parser.c:32147
0x64f7e1 cp_parser_member_declaration
        ../../gcc/gcc/cp/parser.c:20550
0x65248c cp_parser_member_specification_opt
        ../../gcc/gcc/cp/parser.c:20093
0x65248c cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:19321
0x654d40 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:19548
0x654d40 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:14337
0x66d200 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:11573
0x672da9 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:11163
0x656f13 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:11112
0x67d542 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:11009
0x67c238 cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10895
0x67daea cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4030
0x67daea c_parse_file()
        ../../gcc/gcc/cp/parser.c:31660
0x79e293 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1061
Please submit a full bug report, [etc.]

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]