aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2016-12-14 16:43:07 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2016-12-14 16:43:07 +0000
commitfa0c02c38c52a425c39084f364bb645becb8b7bb (patch)
tree798811392b9f7abe7819b481483fed6299ff508b
parent16370e798cada94eb7af14b4a17c785241f19b18 (diff)
downloadgcc-fa0c02c38c52a425c39084f364bb645becb8b7bb.zip
gcc-fa0c02c38c52a425c39084f364bb645becb8b7bb.tar.gz
gcc-fa0c02c38c52a425c39084f364bb645becb8b7bb.tar.bz2
re PR c++/69481 (ICE with C++11 alias using with templates)
PR c++/69481 * cp-tree.h (TYPE_TEMPLATE_INFO_MAYBE_ALIAS): Always use TYPE_ALIAS_TEMPLATE_INFO for aliases. From-SVN: r243656
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/cp-tree.h12
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 24ceb04..3404e88 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2016-12-14 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/69481
+ * cp-tree.h (TYPE_TEMPLATE_INFO_MAYBE_ALIAS): Always use
+ TYPE_ALIAS_TEMPLATE_INFO for aliases.
+
2016-12-13 Nathan Sidwell <nathan@acm.org>
PR c++/69481
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index cc7ca87..89bb9b2 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -3049,18 +3049,18 @@ extern void decl_shadowed_for_var_insert (tree, tree);
? CLASSTYPE_TEMPLATE_INFO (NODE) \
: NULL_TREE)))
-/* Template information for an alias template type. */
+/* Template information (if any) for an alias type. */
#define TYPE_ALIAS_TEMPLATE_INFO(NODE) \
(DECL_LANG_SPECIFIC (TYPE_NAME (NODE)) \
? DECL_TEMPLATE_INFO (TYPE_NAME (NODE)) \
: NULL_TREE)
-/* If NODE is a specialization of an alias template, this accessor
- returns the template info for the alias template. Otherwise behave
- as TYPE_TEMPLATE_INFO. */
+/* If NODE is a type alias, this accessor returns the template info
+ for the alias template (if any). Otherwise behave as
+ TYPE_TEMPLATE_INFO. */
#define TYPE_TEMPLATE_INFO_MAYBE_ALIAS(NODE) \
- (TYPE_ALIAS_P (NODE) && DECL_LANG_SPECIFIC (TYPE_NAME (NODE)) \
- ? DECL_TEMPLATE_INFO (TYPE_NAME (NODE)) \
+ (TYPE_ALIAS_P (NODE) \
+ ? TYPE_ALIAS_TEMPLATE_INFO (NODE) \
: TYPE_TEMPLATE_INFO (NODE))
/* Set the template information for an ENUMERAL_, RECORD_, or