Debian Codegraph @

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

raw
1 // { dg-do compile }
2 // { dg-options "-fgnu-tm -O" }
3
4 class InputStream
5 {
6 public:
7 // __attribute__((transaction_safe))
8 virtual unsigned int readUint32 () = 0;
9 };
10
11 class Building
12 {
13 public:
14 __attribute__((transaction_safe))
15 Building (InputStream *stream);
16 };
17
18 Building::Building (InputStream *stream)
19 {
20 stream->readUint32 (); /* { dg-error "InputStream::readUint32" } */
21 }