aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/iresolve.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-10-16 09:22:22 -0700
committerNathan Sidwell <nathan@acm.org>2020-10-16 09:25:47 -0700
commita16da48bf19bb139e5461e5b5b7f072d5369b054 (patch)
tree092a2a23d7414f69e519bb1440c8560a3d5b8f52 /gcc/fortran/iresolve.c
parenta6590686f72e2a99d290b5e96e54e550446009de (diff)
downloadgcc-a16da48bf19bb139e5461e5b5b7f072d5369b054.zip
gcc-a16da48bf19bb139e5461e5b5b7f072d5369b054.tar.gz
gcc-a16da48bf19bb139e5461e5b5b7f072d5369b054.tar.bz2
c++: Fix null deref at EOF [PR96258]
cp_parser_declaration peeks at 1 or 2 tokens, when I changed it not to peek past EOF, I set the second token to NULL. But there are paths through the function that just look at the second token. Fixed by setting that token to EOF rather than NULL in this case. PR c++/96258 gcc/cp/ * parser.c (cp_parser_declaration): Make token2 point to EOF if token1 was EOF. gcc/testsuite/ * g++.dg/parse/pr96258.C: New.
Diffstat (limited to 'gcc/fortran/iresolve.c')
0 files changed, 0 insertions, 0 deletions