☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-99859-2.C
☽
☼
gcc/testsuite/g++.dg/cpp1y/constexpr-99859-2.C
code
plain
raw
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, "");