diff options
author | Kerem Kat <keremkat@gmail.com> | 2020-01-16 23:42:11 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2020-01-16 23:42:11 +0000 |
commit | 852f0ae80555238c425e33f98df5c7077694bd9f (patch) | |
tree | af3277d077383ad1305ca29e09c7bf5621392927 /gcc/predict.c | |
parent | f5b25e15165adde1356af42e9066ab75c5b37a19 (diff) | |
download | gcc-852f0ae80555238c425e33f98df5c7077694bd9f.zip gcc-852f0ae80555238c425e33f98df5c7077694bd9f.tar.gz gcc-852f0ae80555238c425e33f98df5c7077694bd9f.tar.bz2 |
Fix ICE caused by swallowing a token in c_parser_consume_token
This patch fixes ICE on invalid code, specifically files that have
conflict-marker-like signs before EOF.
PR c/92833
gcc/c/
* c-parser.c (c_parser_consume_token): Fix peeked token stack pop
to support 4 available tokens.
gcc/testsuite/
* c-c++-common/pr92833-1.c, c-c++-common/pr92833-2.c,
c-c++-common/pr92833-3.c, c-c++-common/pr92833-4.c: New tests.
Diffstat (limited to 'gcc/predict.c')
0 files changed, 0 insertions, 0 deletions