mirror of git://gcc.gnu.org/git/gcc.git
re PR c++/12924 (ICE in lookup_member, at cp/search.c:1228)
PR c++/12924 * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR with OVERLOAD and DECL nodes as the first operand. * g++.dg/template/template-id-2.C: New test. From-SVN: r73851
This commit is contained in:
parent
539edbe025
commit
4864cc4ab3
|
|
@ -1,3 +1,9 @@
|
||||||
|
2003-11-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||||
|
|
||||||
|
PR c++/12924
|
||||||
|
* typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
|
||||||
|
with OVERLOAD and DECL nodes as the first operand.
|
||||||
|
|
||||||
2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||||
|
|
||||||
* pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
|
* pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
|
||||||
|
|
|
||||||
|
|
@ -1860,6 +1860,11 @@ finish_class_member_access_expr (tree object, tree name)
|
||||||
is_template_id = true;
|
is_template_id = true;
|
||||||
template_args = TREE_OPERAND (name, 1);
|
template_args = TREE_OPERAND (name, 1);
|
||||||
name = TREE_OPERAND (name, 0);
|
name = TREE_OPERAND (name, 0);
|
||||||
|
|
||||||
|
if (TREE_CODE (name) == OVERLOAD)
|
||||||
|
name = DECL_NAME (get_first_fn (name));
|
||||||
|
else if (DECL_P (name))
|
||||||
|
name = DECL_NAME (name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TREE_CODE (name) == SCOPE_REF)
|
if (TREE_CODE (name) == SCOPE_REF)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2003-11-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||||
|
|
||||||
|
PR c++/12924
|
||||||
|
* g++.dg/template/template-id-2.C: New test.
|
||||||
|
|
||||||
2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||||
|
|
||||||
PR c++/5369
|
PR c++/5369
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
// { dg-do compile }
|
||||||
|
|
||||||
|
// Origin: Richard Guenther <rguenth@tat.physik.uni-tuebingen.de>
|
||||||
|
|
||||||
|
// PR c++/12924
|
||||||
|
|
||||||
|
template<typename> struct A {};
|
||||||
|
|
||||||
|
template<> struct A<void>
|
||||||
|
{
|
||||||
|
template<typename T> void foo()
|
||||||
|
{
|
||||||
|
A<T> a;
|
||||||
|
a.template foo<int>(); // { dg-error "no member" }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void bar()
|
||||||
|
{
|
||||||
|
A<void> a;
|
||||||
|
a.foo<int>(); // { dg-error "instantiated" }
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue