Debian Codegraph @

gcc/testsuite/g++.dg/tm/pr47746.C

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