summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/const3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/const3.C')
-rw-r--r--gcc/testsuite/g++.dg/template/const3.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/const3.C b/gcc/testsuite/g++.dg/template/const3.C
new file mode 100644
index 000000000..998b6976e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/const3.C
@@ -0,0 +1,20 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin PR c++/42251
+// { dg-do compile }
+
+struct foo
+{
+ static const bool b = false;
+};
+
+template<bool x>
+struct S1
+{
+};
+
+template<bool x>
+struct S2
+ : S1<foo::b>
+{
+};
+