Blame SOURCES/gcc48-pr53658.patch

fdda51
2013-06-07  Paolo Carlini  <paolo.carlini@oracle.com>
fdda51
fdda51
	PR c++/53658
fdda51
	* pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
fdda51
	not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
fdda51
fdda51
--- gcc/cp/pt.c
fdda51
+++ gcc/cp/pt.c
fdda51
@@ -7561,7 +7561,7 @@ lookup_template_class_1 (tree d1, tree arglist, tree in_decl, tree context,
fdda51
       if (CLASS_TYPE_P (template_type) && is_dependent_type)
fdda51
 	/* If the type makes use of template parameters, the
fdda51
 	   code that generates debugging information will crash.  */
fdda51
-	DECL_IGNORED_P (TYPE_STUB_DECL (t)) = 1;
fdda51
+	DECL_IGNORED_P (TYPE_MAIN_DECL (t)) = 1;
fdda51
 
fdda51
       /* Possibly limit visibility based on template args.  */
fdda51
       TREE_PUBLIC (type_decl) = 1;
fdda51
--- /dev/null
fdda51
+++ gcc/testsuite/g++.dg/cpp0x/alias-decl-36.C
fdda51
@@ -0,0 +1,6 @@
fdda51
+// PR c++/53658
fdda51
+// { dg-do compile { target c++11 } }
fdda51
+
fdda51
+struct A;
fdda51
+template <typename> using Foo = const A;
fdda51
+template <typename Item> Foo <Item> bar();