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++/69793] ICE on invalid code in "cp_lexer_peek_nth_token"


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

--- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Wed May 18 16:26:35 2016
New Revision: 236414

URL: https://gcc.gnu.org/viewcvs?rev=236414&root=gcc&view=rev
Log:
/cp
2016-05-18  Paolo Carlini  <paolo.carlini@oracle.com>

        PR c++/69793
        * parser.c (cp_parser_template_id): Don't call cp_lexer_peek_nth_token
        when the previous cp_lexer_peek_token returns CPP_EOF.

/testsuite
2016-05-18  Paolo Carlini  <paolo.carlini@oracle.com>

        PR c++/69793
        * g++.dg/template/crash122.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/template/crash122.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog

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