re PR c++/71182 (parser.c cp_lexer_previous_token sanitizer detects member call on...
authorJakub Jelinek <jakub@redhat.com>
Wed, 4 Jan 2017 20:05:14 +0000 (21:05 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 4 Jan 2017 20:05:14 +0000 (21:05 +0100)
commit066435fe10c4982780b05844793ddf287ac1d225
tree703db28e3bf3d68d2213426b81d687c7014bf97c
parentfb85f9d05f09a3e122d702f85b8af306a3999357
re PR c++/71182 (parser.c cp_lexer_previous_token sanitizer detects member call on null pointer)

PR c++/71182
* parser.c (cp_lexer_previous_token): Use vec_safe_address in the
assertion, as lexer->buffer may be NULL.

* g++.dg/cpp0x/pr71182.C: New test.

From-SVN: r244070
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr71182.C [new file with mode: 0644]