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
/
pr95226.C
blob
0808bd6a2312fcaa86b769b999cb65bcf9a348f6
1
// PR c++/95226
2
// { dg-do run { target c++14 } }
3
// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } }
4
5
#include <vector>
6
7
struct T {
8
unsigned a;
9
float b {8.};
10
};
11
12
int main()
13
{
14
T t = {1};
15
std::vector<T> tt = {{1}, {2}};
16
if (t.a != 1 || t.b != 8.0f || tt[0].a != 1 || tt[0].b != 8.0f || tt[1].a != 2 || tt[1].b != 8.0f)
17
__builtin_abort ();
18
}