re PR c++/69793 (ICE on invalid code in "cp_lexer_peek_nth_token")
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 18 May 2016 16:26:35 +0000 (16:26 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 18 May 2016 16:26:35 +0000 (16:26 +0000)
commitc584aca60cbface2621ebf1ccc943df1b7af52ca
tree3334df65b31e82ffa1da6e7e4a31d5317142db8f
parent28644f75a950c0710e49948b93321eb47004c438
re PR c++/69793 (ICE on invalid code in "cp_lexer_peek_nth_token")

/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.

From-SVN: r236414
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/crash122.C [new file with mode: 0644]