aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.3/gcc/testsuite/g++.dg/template/defarg13.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.4.3/gcc/testsuite/g++.dg/template/defarg13.C')
-rw-r--r--gcc-4.4.3/gcc/testsuite/g++.dg/template/defarg13.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.4.3/gcc/testsuite/g++.dg/template/defarg13.C b/gcc-4.4.3/gcc/testsuite/g++.dg/template/defarg13.C
new file mode 100644
index 000000000..ba2980bfa
--- /dev/null
+++ b/gcc-4.4.3/gcc/testsuite/g++.dg/template/defarg13.C
@@ -0,0 +1,19 @@
+// PR c++/14912
+// Bug: We were instantiating A<B> in order to compare it to the matching
+// argument for C<B,B>, which fails.
+
+template <class T>
+struct A
+{
+ typedef typename T::F F;
+};
+
+struct B { };
+
+template <class T, class U = typename A<T>::F >
+struct C
+{
+ typename T::F f; // { dg-error "no type" }
+};
+
+C<B, B> c; // { dg-message "instantiated" }