re PR c++/85076 (ICE with invalid template used as lambda argument)
PR c++/85076 * tree.c (cp_build_reference_type): If to_type is error_mark_node, return it right away. * g++.dg/cpp1y/pr85076.C: New test. From-SVN: r258901
This commit is contained in:
parent
ef22816c3b
commit
dc442cef60
4 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2018-03-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/85076
|
||||
* tree.c (cp_build_reference_type): If to_type is error_mark_node,
|
||||
return it right away.
|
||||
|
||||
2018-03-27 Volker Reichelt <v.reichelt@netcologne.de>
|
||||
|
||||
* search.c (check_final_overrider): Use inform instead of error
|
||||
|
|
|
@ -1078,6 +1078,9 @@ cp_build_reference_type (tree to_type, bool rval)
|
|||
{
|
||||
tree lvalue_ref, t;
|
||||
|
||||
if (to_type == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
if (TREE_CODE (to_type) == REFERENCE_TYPE)
|
||||
{
|
||||
rval = rval && TYPE_REF_IS_RVALUE (to_type);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2018-03-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/85076
|
||||
* g++.dg/cpp1y/pr85076.C: New test.
|
||||
|
||||
2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR fortran/85084
|
||||
|
|
6
gcc/testsuite/g++.dg/cpp1y/pr85076.C
Normal file
6
gcc/testsuite/g++.dg/cpp1y/pr85076.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// PR c++/85076
|
||||
// { dg-do compile { target c++14 } }
|
||||
|
||||
template<typename> struct A*; // { dg-error "expected unqualified-id before" }
|
||||
|
||||
auto a = [](A<auto>) {}; // { dg-error "is not a template|has incomplete type" }
|
Loading…
Add table
Reference in a new issue