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