Commit ae2196c2 by Mark Mitchell Committed by Mark Mitchell

re PR c++/10446 (ICE on a definition of a nonexistent member function of a…

re PR c++/10446 (ICE on a definition of a nonexistent member function of a nested class in a class template)

	PR c++/10446
	* search.c (lookup_fnfields_1): Handle empty slots in the method
	vector.

	PR c++/10446
	* g++.dg/parse/crash3.C: New test.

From-SVN: r65962
parent 6d412a7b
2003-04-22 Mark Mitchell <mark@codesourcery.com>
PR c++/10446
* search.c (lookup_fnfields_1): Handle empty slots in the method
vector.
PR c++/10428
* decl.c (check_elaborated_type_specifier): New function, split
out from ...
......
......@@ -1400,9 +1400,14 @@ lookup_fnfields_1 (tree type, tree name)
n_outer_fields_searched++;
#endif /* GATHER_STATISTICS */
tmp = DECL_NAME (OVL_CURRENT (methods[i]));
if (tmp > name)
tmp = methods[i];
/* This slot may be empty; we allocate more slots
than we need. In that case, the entry we're
looking for is closer to the beginning of the
list. */
if (tmp)
tmp = DECL_NAME (OVL_CURRENT (tmp));
if (!tmp || tmp > name)
hi = i;
else if (tmp < name)
lo = i + 1;
......
2003-04-22 Mark Mitchell <mark@codesourcery.com>
PR c++/10446
* g++.dg/parse/crash3.C: New test.
PR c++/10428
* g++.dg/parse/elab1.C: New test.
......
template <class T> struct L { struct I {}; };
template <class T> void L<T>::I::foo() {} // { dg-error "" }
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