Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
tm
/
unsafe2.C
blob: b0425ac6cee85b5953d9e4cd01212c29e8ae4990 [
file
] [
log
] [
blame
]
// Transaction-unsafe testcase from TM TS.
// { dg-options -fgnu-tm }
template
<
class
T
>
void
f
(
T
)
transaction_safe
;
template
<>
void
f
(
bool
);
// not transaction-safe
void
g
()
transaction_safe
{
f
(
42
);
// OK
f
(
true
);
// { dg-error "unsafe" }
}