summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/alias-decl-55.C
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-08-22 10:27:46 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-08-22 10:27:46 +0000
commitf733cf303bcdc952c92b81dd62199a40a1f555ec (patch)
tree0a9a9e0f28aa7c7f5bc4d1d1d0e9647163cac4f7 /gcc/testsuite/g++.dg/cpp0x/alias-decl-55.C
parente0e4357b88efe5dc53e50d341a09de4d02331200 (diff)
downloadgcc-tarball-gcc-6.2.0.tar.gz
gcc-6.2.0gcc-6.2.0
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/alias-decl-55.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-55.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-55.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-55.C
new file mode 100644
index 0000000000..135ff53290
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-55.C
@@ -0,0 +1,23 @@
+// PR c++/71718
+// { dg-do compile { target c++11 } }
+
+template <typename T>
+class A : T{};
+
+template <typename T>
+using sp = A<T>;
+
+struct Base {};
+
+template <typename T, int num = 1>
+const sp<T>
+rec() // { dg-error "depth" }
+{
+ return rec<T, num - 1>();
+}
+
+static void f(void) {
+ rec<Base>();
+}
+
+// { dg-prune-output "compilation terminated" }