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
Fix last commit.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
init-statement3.C
blob
c178eafe1fb7801460363ada4a400505bf28d23b
1
// { dg-do run }
2
// { dg-options -std=c++1z }
3
// Test C++17 selection statements with initializer, side-effects.
4
5
int
6
main ()
7
{
8
int g = 0;
9
10
if (g++; g > 1)
11
__builtin_abort ();
12
if (++g; g > 2)
13
__builtin_abort ();
14
if (g != 2)
15
__builtin_abort ();
16
}