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
c++, coroutines: Simplify separation of the user function body and ramp.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-101371.C
blob
b6351b806b9898776275ee5fcbde7971951ac14a
1
// PR c++/101371
2
// { dg-do compile { target c++14 } }
3
4
struct A {
5
int i;
6
};
7
struct B {
8
A a{};
9
constexpr B() : a() {}
10
constexpr B(const B &rhs) : a(rhs.a) {}
11
};
12
struct C {
13
B arr[1];
14
};
15
16
struct X {
17
constexpr C fn () const
18
{
19
C c{};
20
return c;
21
}
22
};
23
24
void
25
g ()
26
{
27
X x;
28
constexpr auto z = x.fn();
29
}