aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog12
-rw-r--r--gcc/cp/pt.c3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/pr89913.C6
4 files changed, 26 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 08b44c5..cc7a58e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,15 @@
+2019-11-15 Andrew Sutton <asutton@lock3software.com>
+
+ PR c++/89913
+ * pt.c (get_underlying_template): Exit loop if the original type
+ of the alias is null.
+
+2019-11-19 Andrew Sutton <asutton@lock3software.com>
+
+ PR c++/92078
+ * pt.c (maybe_new_partial_specialization): Apply access to newly
+ created partial specializations. Update comment style.
+
2019-11-19 Andrew Sutton <asutton@lock3software.com>
PR c++/92078
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 59f9d03..064fe5b 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -6395,6 +6395,9 @@ get_underlying_template (tree tmpl)
{
/* Determine if the alias is equivalent to an underlying template. */
tree orig_type = DECL_ORIGINAL_TYPE (DECL_TEMPLATE_RESULT (tmpl));
+ /* The underlying type may have been ill-formed. Don't proceed. */
+ if (!orig_type)
+ break;
tree tinfo = TYPE_TEMPLATE_INFO_MAYBE_ALIAS (orig_type);
if (!tinfo)
break;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index edbf126..13ce849 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-11-15 Andrew Sutton <asutton@lock3software.com>
+
+ PR c++/89913
+ * g++.dg/cpp2a/pr89913.C: New test.
+
2019-11-19 Andrew Sutton <asutton@lock3software.com>
PR c++/92078
diff --git a/gcc/testsuite/g++.dg/cpp2a/pr89913.C b/gcc/testsuite/g++.dg/cpp2a/pr89913.C
new file mode 100644
index 0000000..c06847e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/pr89913.C
@@ -0,0 +1,6 @@
+// { dg-do compile { target c++2a } }
+
+template<typename...> using A = auto; // { dg-error "not allowed" }
+// In pre-20, the error is "invalid use of auto"
+
+template<typename... T> using B = A<T...>;