File: constexpr-61323.C

package info (click to toggle)
gcc-arm-none-eabi 15%3A8-2019-q3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 571,828 kB
  • sloc: ansic: 2,937,651; cpp: 881,644; ada: 597,189; makefile: 65,528; asm: 56,499; xml: 46,621; exp: 24,747; sh: 19,684; python: 7,256; pascal: 4,370; awk: 3,497; perl: 2,695; yacc: 316; ml: 285; f90: 234; lex: 198; objc: 194; haskell: 119
file content (26 lines) | stat: -rw-r--r-- 887 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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>(); }