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