blob: 7cd9e1006d12b8e36326847701fc71bba02f3a26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// { dg-do compile }
// { dg-options "-fgnu-tm" }
class InputStream
{
public:
virtual unsigned int readUint32 () = 0;
};
class Building
{
public:
__attribute__((transaction_safe)) Building (InputStream *stream);
__attribute__((transaction_safe)) void freeGradients ();
void load (InputStream *stream);
};
Building::Building (InputStream *stream)
{
load(stream);
}
void Building::load (InputStream *stream)
{
int j = (int)stream->readUint32 ();
freeGradients ();
}
|