summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup/hidden-class12.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/lookup/hidden-class12.C')
-rw-r--r--gcc/testsuite/g++.dg/lookup/hidden-class12.C24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lookup/hidden-class12.C b/gcc/testsuite/g++.dg/lookup/hidden-class12.C
new file mode 100644
index 000000000..4a3f2d761
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/hidden-class12.C
@@ -0,0 +1,24 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin PR c++/36019
+// { dg-do compile }
+
+struct F {
+ static const int x = 0;
+};
+
+struct A {
+ template <typename A>
+ static int f ()
+ {
+ return A::x;
+ }
+};
+
+
+int
+main ()
+{
+ int i = A::f<F> ();
+ return i;
+}
+