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++/56973, DR 696 - capture constant variables only as needed.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-79681-1.C
blob
000afd80e04e7cc7d49166d1eb1b3b515f55608b
1
// PR c++/79681
2
// { dg-do compile { target c++14 } }
3
// { dg-options "-O2" }
4
5
struct A
6
{
7
int i : 4;
8
};
9
10
constexpr bool
11
foo ()
12
{
13
A x[] = { 1 };
14
return x[0].i;
15
}
16
17
static_assert (foo(), "");