summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/using27.C
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-02-10 04:13:42 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-02-10 04:13:42 -0800
commit9547f24e09cb9cf4db70f0ad308d2f03015c7d81 (patch)
tree16b168d8b010c84e72d37f9aa22e216d5a2a8b3d /gcc/testsuite/g++.dg/template/using27.C
parent5a28f86b322357cb07d2ae3a42fa39f0749cf9f2 (diff)
parentae10eb82fe34c18640ad65c2ab94ffc53f349315 (diff)
downloadgcc-hjl/x32/gcc-4_7-branch.tar.gz
Merge remote-tracking branch 'origin/gcc-4_7-branch' into hjl/x32/gcc-4_7-branchhjl/x32/gcc-4_7-branch
Diffstat (limited to 'gcc/testsuite/g++.dg/template/using27.C')
-rw-r--r--gcc/testsuite/g++.dg/template/using27.C33
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/using27.C b/gcc/testsuite/g++.dg/template/using27.C
new file mode 100644
index 00000000000..f1835e17161
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/using27.C
@@ -0,0 +1,33 @@
+// PR c++/37140
+
+struct X
+{
+ typedef int nested_type;
+};
+
+template <class T>
+struct A
+{
+ typedef X type;
+};
+
+template <class T>
+struct B : A<T>
+{
+ using typename A<T>::type;
+ typename type::nested_type x;
+};
+
+template <class T>
+struct C : B<T>
+{
+ using typename B<T>::type;
+ typename type::nested_type y;
+};
+
+struct D : C<int>
+{
+ using C<int>::type;
+ type::nested_type z;
+};
+