Commit 41d93b16 by Nathan Sidwell Committed by Nathan Sidwell

[PR c++/90754] name lookup ICE

https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00952.html
	PR c++/90754
	* name-lookup.c (lookup_type_scope_1): Calll qualify_lookup before
	checking context.

	PR c++/90754
	* g++.dg/lookup/pr90754.C: New.

From-SVN: r272384
parent 07c8304c
2019-06-17 Nathan Sidwell <nathan@acm.org>
PR c++/90754
* name-lookup.c (lookup_type_scope_1): Calll qualify_lookup before
checking context.
2019-06-14 Marek Polacek <polacek@redhat.com> 2019-06-14 Marek Polacek <polacek@redhat.com>
PR c++/90884 - stray note with -Wctor-dtor-privacy. PR c++/90884 - stray note with -Wctor-dtor-privacy.
......
...@@ -6487,15 +6487,15 @@ lookup_type_scope_1 (tree name, tag_scope scope) ...@@ -6487,15 +6487,15 @@ lookup_type_scope_1 (tree name, tag_scope scope)
typedef struct C {} C; typedef struct C {} C;
correctly. */ correctly. */
if (tree type = iter->type) if (tree type = iter->type)
if ((scope != ts_current if (qualify_lookup (type, LOOKUP_PREFER_TYPES)
|| LOCAL_BINDING_P (iter) && (scope != ts_current
|| DECL_CONTEXT (type) == iter->scope->this_entity) || LOCAL_BINDING_P (iter)
&& qualify_lookup (iter->type, LOOKUP_PREFER_TYPES)) || DECL_CONTEXT (type) == iter->scope->this_entity))
return iter->type; return type;
if ((scope != ts_current if (qualify_lookup (iter->value, LOOKUP_PREFER_TYPES)
|| !INHERITED_VALUE_BINDING_P (iter)) && (scope != ts_current
&& qualify_lookup (iter->value, LOOKUP_PREFER_TYPES)) || !INHERITED_VALUE_BINDING_P (iter)))
return iter->value; return iter->value;
} }
......
2019-06-17 Nathan Sidwell <nathan@acm.org>
PR c++/90754
* g++.dg/lookup/pr90754.C: New.
2019-06-17 Wilco Dijkstra <wdijkstr@arm.com> 2019-06-17 Wilco Dijkstra <wdijkstr@arm.com>
PR middle-end/64242 PR middle-end/64242
......
// PR c++/90754 ICE in type lookup.
class A {
struct COMTypeInfo;
};
class B {
struct COMTypeInfo;
};
class C : A, B {
struct COMTypeInfo;
};
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