aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2011-11-20 07:10:24 +0000
committerDodji Seketeli <dodji@gcc.gnu.org>2011-11-20 08:10:24 +0100
commitfcb36e7363f231cd0b58f500ef6fabf6da214e32 (patch)
treebc79e57074c519761cbdad6d84718baf024059ab /gcc/testsuite
parent417c27ab304f6e807ff295a53e49b5c8169bd272 (diff)
downloadgcc-fcb36e7363f231cd0b58f500ef6fabf6da214e32.zip
gcc-fcb36e7363f231cd0b58f500ef6fabf6da214e32.tar.gz
gcc-fcb36e7363f231cd0b58f500ef6fabf6da214e32.tar.bz2
PR c++/51194 - ICE with invalid alias template
gcc/cp/ PR c++/51194 * pt.c (lookup_template_class_1): Go out early if the type of the template is error_mark_node. gcc/testsuite/ PR c++/51194 * g++.dg/cpp0x/alias-decl-15.C: New test. From-SVN: r181523
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-15.C17
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 861f36c4..c5f33a6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-20 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/51194
+ * g++.dg/cpp0x/alias-decl-15.C: New test.
+
2011-11-19 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51216
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-15.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-15.C
new file mode 100644
index 0000000..2bc9b11
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-15.C
@@ -0,0 +1,17 @@
+// Origin PR c++/51194
+// { dg-options "-std=c++0x" }
+
+template<class U, class V> //#1
+struct foo {}; // { dg-error "provided for|foo" }
+
+template<class U, class V=char>
+struct P {};
+
+template<template<class... U> class... TT>
+struct bar {
+ template<class... Args>
+ using mem = P<TT<Args...>...>;//#2 { dg-error "wrong number of|arguments" }
+};
+
+bar<foo>::mem<int, char> b;//#3 { dg-error "invalid type" }
+