Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
tm
/
sync1.C
blob: a567b2cc3e26441f0e3fa20f084ea7e321f1caa4 [
file
] [
log
] [
blame
]
// Testcase from TM TS.
// { dg-options -fgnu-tm }
extern
"C"
int
printf
(
const
char
*,
...);
int
f
()
{
static
int
i
=
0
;
synchronized
{
printf
(
"before %d\n"
,
i
);
++
i
;
printf
(
"after %d\n"
,
i
);
return
i
;
}
}