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