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
* doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
aggr-base5.C
blob
5f6d9ad8beb1b89036b4c51db3920ee7ac12c4d7
1
// { dg-options "-std=c++17 -w" }
2
// { dg-do run }
3
4
struct A { };
5
struct B: A { int i; };
6
struct C: A, B { int j; };
7
8
constexpr C c = { {}, { {}, 1 }, 2 };
9
10
#define assert(X) do { if (!(X)) __builtin_abort(); } while(0)
11
int main()
12
{
13
assert (c.i == 1 && c.j == 2);
14
}