diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2017-10-16 08:25:31 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2017-10-16 08:25:31 +0000 |
commit | 6fba3d61eff769b078ec1cbfcdf21fb1351742f7 (patch) | |
tree | 99d448a67031dc71a360f1cda6f0677ddce74a6e | |
parent | 1be043a140d516e16930bbc357f5ccb7b98c1db5 (diff) | |
download | gcc-6fba3d61eff769b078ec1cbfcdf21fb1351742f7.zip gcc-6fba3d61eff769b078ec1cbfcdf21fb1351742f7.tar.gz gcc-6fba3d61eff769b078ec1cbfcdf21fb1351742f7.tar.bz2 |
re PR c++/61323 ('static' and 'const' attributes cause non-type template argument matching failure)
2017-10-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/61323
* g++.dg/cpp0x/constexpr-61323.C: New.
From-SVN: r253777
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-61323.C | 26 |
2 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ff99cba..3458692 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-10-16 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/61323 + * g++.dg/cpp0x/constexpr-61323.C: New. + 2017-10-15 Paolo Carlini <paolo.carlini@oracle.com> PR c++/54090 diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-61323.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-61323.C new file mode 100644 index 0000000..f194bb8 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-61323.C @@ -0,0 +1,26 @@ +// PR c++/61323 +// { dg-do compile { target c++11 } } + +char* table1[10]; +template<unsigned size, char*(&table)[size]> void test1() { } +void tester1() { test1<10,table1>(); } + +static char* table2[10]; +template<unsigned size, char*(&table)[size]> void test2() { } +void tester2() { test2<10,table2>(); } + +const char* table3[10]; +template<unsigned size, const char*(&table)[size]> void test3() { } +void tester3() { test3<10,table3>(); } + +const char* const table4[10] = {}; +template<unsigned size, const char*const (&table)[size]> void test4() { } +void tester4() { test4<10,table4>(); } + +const char* volatile table5[10] = {}; +template<unsigned size, const char* volatile (&table)[size]> void test5() { } +void tester5() { test5<10,table5>(); } + +const char* const table6[10] = {}; +template<unsigned size, const char*const (&table)[size]> void test6() { } +void tester6() { test6<10,table6>(); } |