re PR c++/18470 (array bound rejected as non-constant in template)
authorAndrew Pinski <pinskia@physics.uc.edu>
Thu, 10 Feb 2005 01:05:31 +0000 (01:05 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Thu, 10 Feb 2005 01:05:31 +0000 (17:05 -0800)
2005-02-09  Andrew Pinski  <pinskia@physics.uc.edu>

        PR c++/18470
        * g++.dg/template/static12.C: New test.

From-SVN: r94789

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/static12.C [new file with mode: 0644]

index ace4d02e9b8658daf674a4c8d8e125b8fbc0206b..210102d58969d28ee5fdcd38f31916d5ba06d78a 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-09  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR c++/18470
+       * g++.dg/template/static12.C: New test.
+
 2005-02-09  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/19787
diff --git a/gcc/testsuite/g++.dg/template/static12.C b/gcc/testsuite/g++.dg/template/static12.C
new file mode 100644 (file)
index 0000000..73becab
--- /dev/null
@@ -0,0 +1,13 @@
+// PR c++/18470
+
+template<typename> struct A
+{
+    static const int i=1;
+};
+
+template<typename T> struct B : A<T>
+{
+    using A<T>::i;
+    char s[i];       // fails
+    char t[A<T>::i]; // compiles
+};