repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/85553
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-array8.C
blob
f4aae4f58d9f09260870a049a2ef56ef0bb0574b
1
// { dg-do run { target c++11 } }
2
3
struct A { int i,j; };
4
5
struct X {
6
A a = {1,1};
7
};
8
9
constexpr X table[2][2] = {{ {} }};
10
11
#define SA(X) static_assert(X,#X)
12
SA(table[1][1].a.i == 1);
13
14
extern "C" void abort();
15
16
const int *p = &table[1][1].a.j;
17
18
int main()
19
{
20
if (*p != 1)
21
abort();
22
}