* search.c (lookup_fnfields_1): Handle empty slots in the method
vector.
PR c++/10446
* g++.dg/parse/crash3.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65962
138bc75d-0d04-0410-961f-
82ee72b054a4
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 ...
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.
--- /dev/null
+template <class T> struct L { struct I {}; };
+template <class T> void L<T>::I::foo() {} // { dg-error "" }