From 6fba3d61eff769b078ec1cbfcdf21fb1351742f7 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 16 Oct 2017 08:25:31 +0000 Subject: [PATCH] re PR c++/61323 ('static' and 'const' attributes cause non-type template argument matching failure) 2017-10-16 Paolo Carlini PR c++/61323 * g++.dg/cpp0x/constexpr-61323.C: New. From-SVN: r253777 --- gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/g++.dg/cpp0x/constexpr-61323.C | 26 ++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-61323.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ff99cba66b7..3458692fcd3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-10-16 Paolo Carlini + + PR c++/61323 + * g++.dg/cpp0x/constexpr-61323.C: New. + 2017-10-15 Paolo Carlini 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 00000000000..f194bb8be82 --- /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 void test1() { } +void tester1() { test1<10,table1>(); } + +static char* table2[10]; +template void test2() { } +void tester2() { test2<10,table2>(); } + +const char* table3[10]; +template void test3() { } +void tester3() { test3<10,table3>(); } + +const char* const table4[10] = {}; +template void test4() { } +void tester4() { test4<10,table4>(); } + +const char* volatile table5[10] = {}; +template void test5() { } +void tester5() { test5<10,table5>(); } + +const char* const table6[10] = {}; +template void test6() { } +void tester6() { test6<10,table6>(); } -- 2.30.2