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
Fortran: fix ALLOCATE with SOURCE of deferred character length [PR114019]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-incr1.C
blob
ecd7c047c851c43d0d260163808d5f8f54ed9e8f
1
// { dg-do compile { target c++14 } }
2
#define SA(X) static_assert((X),#X)
3
4
constexpr int f (int i)
5
{
6
++i;
7
int x = i;
8
++x;
9
return x;
10
}
11
12
constexpr int* g (int* p)
13
{
14
++p;
15
return p;
16
}
17
18
constexpr int i = f(42);
19
SA(i==44);
20
21
int array[4];
22
constexpr int* p = g(array);
23
SA(p == &array[1]);