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++/71213] New: ICE on invalid code


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

            Bug ID: 71213
           Summary: ICE on invalid code
           Product: gcc
           Version: 6.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rippey.e at gmail dot com
  Target Milestone: ---

Running g++ 6.1.0 with no arguments on the following program:

#1""3
template<typename>
class C;

template<typename T>
operator<(const,C<T>){
    operator<

produces this error message:

: In function âint operator<(int, C<T>)â:
:6:10: internal compiler error: in cp_lexer_peek_nth_token, at cp/parser.c:1055
0x67cd62 cp_lexer_peek_nth_token
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:1055
0x699e1b cp_parser_template_id
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:14841
0x69b03a cp_parser_type_name
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:16376
0x68ca51 cp_parser_type_name
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:16347
0x68ca51 cp_parser_simple_type_specifier
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:16261
0x688ecd cp_parser_type_specifier
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:15914
0x69a9fc cp_parser_decl_specifier_seq
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:12760
0x6a4c41 cp_parser_simple_declaration
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:12301
0x6a50ba cp_parser_block_declaration
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:12248
0x6a5a29 cp_parser_declaration_statement
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:11860
0x6a2d3c cp_parser_statement
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:10528
0x6a33a4 cp_parser_statement_seq_opt
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:10806
0x6a347f cp_parser_compound_statement
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:10760
0x6a3593 cp_parser_function_body
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:20685
0x6a3593 cp_parser_ctor_initializer_opt_and_function_body
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:20721
0x6a3e10 cp_parser_function_definition_after_declarator
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:25383
0x6a4b7b cp_parser_function_definition_from_specifiers_and_declarator
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:25295
0x6a4b7b cp_parser_init_declarator
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:18457
0x6a5d3f cp_parser_single_declaration
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:25836
0x6a5e2c cp_parser_template_declaration_after_parameters
        /disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:25444
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

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