re PR c++/79420 (ICE on invalid C++ code on x86_64-linux-gnu: in tsubst_copy, at...
authorMarek Polacek <polacek@redhat.com>
Tue, 14 Feb 2017 17:33:21 +0000 (17:33 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 14 Feb 2017 17:33:21 +0000 (17:33 +0000)
commit6f207d5810934c0156cda61a12a56ff1915adb79
treeef7fa14d23662415cd3f8e34f9468481f5ff75ab
parentee139af5321d25192e675cc276460d7ab6fcffe9
re PR c++/79420 (ICE on invalid C++ code on x86_64-linux-gnu: in tsubst_copy, at cp/pt.c:14573)

PR c++/79420
PR c++/79463
* parser.c (cp_parser_postfix_dot_deref_expression): Avoid
clobbering if the postfix expression isn't an EXPR_P.

* g++.dg/cpp1y/pr79463.C: New.
* g++.dg/template/incomplete10.C: New.
* g++.dg/template/incomplete9.C: New.

From-SVN: r245440
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/pr79463.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/incomplete10.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/incomplete9.C [new file with mode: 0644]