diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2005-02-10 01:05:31 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2005-02-09 17:05:31 -0800 |
commit | 5cb0baadb8f181b707a90e2359156a0bb2a6e106 (patch) | |
tree | cc170af100d0ad3be0f69f5c03e85b7871994f87 | |
parent | 88e95ee3851180cf033b254ed3fc671751b572ad (diff) | |
download | gcc-5cb0baadb8f181b707a90e2359156a0bb2a6e106.zip gcc-5cb0baadb8f181b707a90e2359156a0bb2a6e106.tar.gz gcc-5cb0baadb8f181b707a90e2359156a0bb2a6e106.tar.bz2 |
re PR c++/18470 (array bound rejected as non-constant in template)
2005-02-09 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/18470
* g++.dg/template/static12.C: New test.
From-SVN: r94789
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/static12.C | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ace4d02..210102d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 index 0000000..73becab --- /dev/null +++ b/gcc/testsuite/g++.dg/template/static12.C @@ -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 +}; |