summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/static24.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/static24.C')
-rw-r--r--gcc/testsuite/g++.dg/template/static24.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/static24.C b/gcc/testsuite/g++.dg/template/static24.C
new file mode 100644
index 000000000..3d8f9e326
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/static24.C
@@ -0,0 +1,15 @@
+template<typename> struct A;
+
+template<> struct A<char>
+{
+ static const char i = 1;
+};
+
+template<typename T> struct B
+{
+ static const int j = A<T>::i;
+ static const int k = int(j);
+ int x[k];
+};
+
+B<char> b;