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
Add __builtion_unreachable to vector::size(), vector::capacity()
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-90383-2.C
blob
a08b1dd6f4427c15401870d45d0fae3f096cec0a
1
// PR c++/90383
2
// { dg-do run { target c++14 } }
3
// { dg-options "-O2" }
4
5
extern "C" void abort ();
6
struct alignas(8) A { constexpr A (bool x) : a(x) {} A () = default; bool a; };
7
struct B { A b; };
8
9
constexpr bool
10
foo ()
11
{
12
B w{A (true)};
13
w.b = A (true);
14
return w.b.a;
15
}
16
17
int
18
main ()
19
{
20
if (!foo ())
21
abort ();
22
}