re PR c++/84662 (internal compiler error: tree check: expected class 'type', have...
authorJakub Jelinek <jakub@redhat.com>
Fri, 2 Mar 2018 17:07:39 +0000 (18:07 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 2 Mar 2018 17:07:39 +0000 (18:07 +0100)
commit7299275f74a31f7f3774ade89c7447fc6fb7cf98
treede132c3c0a7c7f2a2f0bb85be154514e9206dbc2
parente76feb5b6969156e627d33cfd9d4524dba98a630
re PR c++/84662 (internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in is_bitfield_expr_with_lowered_type, at cp/typeck.c:1944)

PR c++/84662
* pt.c (tsubst_copy_and_build) <case TEMPLATE_ID_EXPR>: Use
RETURN instead of return.
<case POINTER_PLUS_EXPR>: Likewise.
<case CONVERT_EXPR>: If op0 is error_mark_node, just return
it instead of wrapping it into CONVERT_EXPR.

* g++.dg/cpp1y/pr84662.C: New test.

From-SVN: r258146
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/pr84662.C [new file with mode: 0644]