gcc/cp/ChangeLog:
PR c++/42915
* typeck.c (get_template_parms_of_dependent_type): Try getting
the template parameters fromt the type itself first.
gcc/testsuite/ChangeLog:
PR c++/42915
g++.dg/other/crash-9.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156514
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-02-05 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/42915
+ * typeck.c (get_template_parms_of_dependent_type): Try getting
+ the template parameters fromt the type itself first.
+
2010-02-03 Jason Merrill <jason@redhat.com>
PR c++/4926
2010-02-03 Jason Merrill <jason@redhat.com>
PR c++/4926
{
tree tinfo = NULL_TREE, tparms = NULL_TREE;
{
tree tinfo = NULL_TREE, tparms = NULL_TREE;
+ /* First, try the obvious case of getting the
+ template info from T itself. */
+ if ((tinfo = get_template_info (t)))
+ ;
/* If T1 is a typedef or whatever has a template info associated
to its context, get the template parameters from that context. */
/* If T1 is a typedef or whatever has a template info associated
to its context, get the template parameters from that context. */
- if (typedef_variant_p (t)
+ else if (typedef_variant_p (t)
&& DECL_CONTEXT (TYPE_NAME (t))
&& !NAMESPACE_SCOPE_P (TYPE_NAME (t)))
tinfo = get_template_info (DECL_CONTEXT (TYPE_NAME (t)));
&& DECL_CONTEXT (TYPE_NAME (t))
&& !NAMESPACE_SCOPE_P (TYPE_NAME (t)))
tinfo = get_template_info (DECL_CONTEXT (TYPE_NAME (t)));
+2010-02-05 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/42915
+ g++.dg/other/crash-9.C: New test.
+
2010-02-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/42309
2010-02-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/42309
--- /dev/null
+// Origin: PR c++/42915
+// { dg-do compile }
+
+template <typename T>
+class A
+{
+ template <typename U>
+ class B
+ {
+ B foo();
+ };
+};
+template <typename T> template <typename U>
+A<T>::B<U> A<T>::B<U>::foo() {}
+