Add a test case that goes with the last commit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66510 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/instantiation-default-3.cpp b/test/SemaTemplate/instantiation-default-3.cpp
new file mode 100644
index 0000000..b9379d6
--- /dev/null
+++ b/test/SemaTemplate/instantiation-default-3.cpp
@@ -0,0 +1,21 @@
+// RUN: clang -fsyntax-only -verify %s
+
+template<typename T> struct A { };
+
+template<typename T, typename U = A<T*> >
+ struct B : U { };
+
+template<>
+struct A<int*> {
+ void foo();
+};
+
+template<>
+struct A<float*> {
+ void bar();
+};
+
+void test(B<int> *b1, B<float> *b2) {
+ b1->foo();
+ b2->bar();
+}