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
[AArch64] Fix SVE testsuite failures for ILP32 (PR 83846)
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-copy2.C
blob
6707975f0ab53f32c76e794abbf717fd75fd0304
1
// PR c++/69995
2
// { dg-do compile { target c++14 } }
3
4
struct A
5
{
6
int i;
7
};
8
9
constexpr int f(A a)
10
{
11
++a.i;
12
return a.i;
13
}
14
15
constexpr bool g()
16
{
17
A a = { 42 };
18
if (f(a) != 43) return false;
19
if (a.i != 42) return false;
20
return true;
21
}
22
23
#define SA(X) static_assert((X),#X)
24
SA(g());