Commit e6da0bf1 by Paolo Carlini

re PR c++/85014 (internal compiler error: in lookup_base, at cp/search.c:185)

/cp
2019-03-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/85014
	* semantics.c (finish_non_static_data_member): Check return value
	of context_for_name_lookup and immediately return error_mark_node
	if isn't a type.

/testsuite
2019-03-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/85014
	* g++.dg/cpp0x/pr85014.C: New.

From-SVN: r269759
parent f5d56cf9
2019-03-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/85014
* semantics.c (finish_non_static_data_member): Check return value
of context_for_name_lookup and immediately return error_mark_node
if isn't a type.
2019-03-17 Jason Merrill <jason@redhat.com> 2019-03-17 Jason Merrill <jason@redhat.com>
PR c++/89571 - ICE with ill-formed noexcept on constructor. PR c++/89571 - ICE with ill-formed noexcept on constructor.
......
...@@ -1828,7 +1828,15 @@ finish_non_static_data_member (tree decl, tree object, tree qualifying_scope) ...@@ -1828,7 +1828,15 @@ finish_non_static_data_member (tree decl, tree object, tree qualifying_scope)
{ {
tree scope = qualifying_scope; tree scope = qualifying_scope;
if (scope == NULL_TREE) if (scope == NULL_TREE)
scope = context_for_name_lookup (decl); {
scope = context_for_name_lookup (decl);
if (!TYPE_P (scope))
{
/* Can happen during error recovery (c++/85014). */
gcc_assert (seen_error ());
return error_mark_node;
}
}
object = maybe_dummy_object (scope, NULL); object = maybe_dummy_object (scope, NULL);
} }
......
2019-03-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/85014
* g++.dg/cpp0x/pr85014.C: New.
2019-03-18 Jakub Jelinek <jakub@redhat.com> 2019-03-18 Jakub Jelinek <jakub@redhat.com>
PR middle-end/86979 PR middle-end/86979
...@@ -6,11 +11,12 @@ ...@@ -6,11 +11,12 @@
2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org> 2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/88008 PR fortran/88008
* gfortran.dg/typebound_call_31.f90: New test. * gfortran.dg/typebound_call_31.f90: New test.
2019-03-03-17 John David Anglin <danglin@gcc.gnu.org> 2019-03-03-17 John David Anglin <danglin@gcc.gnu.org>
* gcc.dg/compat/pr83487-1_x.c: Use -fno-common option on hppa*-*-hpux*. * gcc.dg/compat/pr83487-1_x.c: Use -fno-common option on
hppa*-*-hpux*.
* gcc.dg/compat/pr83487-1_y.c: Likewise. * gcc.dg/compat/pr83487-1_y.c: Likewise.
* gfortran.dg/pointer_init_10.f90: Require visibility support. * gfortran.dg/pointer_init_10.f90: Require visibility support.
......
// { dg-do compile { target c++11 } }
// { dg-options "" }
struct {
short a[__builtin_constant_p([] {
struct {
int b = b;
}; // { dg-error "abstract declarator" }
})];
}; // { dg-error "abstract declarator" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment