Commit 0f19e7ad by Jason Merrill Committed by Jason Merrill

re PR c++/65721 (Internal compiler error segmentation fault)

	PR c++/65721
	* name-lookup.c (do_class_using_decl): Complain about specifying
	the current class even if there are dependent bases.

From-SVN: r222096
parent 688e531e
2015-04-14 Jason Merrill <jason@redhat.com>
PR c++/65721
* name-lookup.c (do_class_using_decl): Complain about specifying
the current class even if there are dependent bases.
2015-04-14 David Krauss <david_work@me.com>
PR c++/59766
......
......@@ -3408,7 +3408,7 @@ do_class_using_decl (tree scope, tree name)
tf_warning_or_error);
if (b_kind < bk_proper_base)
{
if (!bases_dependent_p)
if (!bases_dependent_p || b_kind == bk_same_type)
{
error_not_base_type (scope, current_class_type);
return NULL_TREE;
......
// PR c++/65721
template<typename T>
struct A {
typedef T D;
};
template<typename X>
class B : public A<X> {
using typename B::D; // { dg-error "not a base" }
public:
D echo(D x) { // { dg-error "D" }
return x;
}
};
int main() {
B<int> b;
}
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