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
tree-optimization/116481 - avoid building function_type[]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-99859-2.C
blob
a249f4746664c54b7cc5c7faebfc36e98564ec6c
1
// PR c++/99859
2
// { dg-do compile { target c++14 } }
3
4
struct A
5
{
6
int i;
7
constexpr int f() { return i; }
8
constexpr A() : i(0) { i = f(); i = 1; i = f(); }
9
};
10
11
constexpr A a = A();
12
static_assert (a.i == 1, "");