aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/tm/pr47747.C
blob: 3b50904b5d966b9be277ffaca7a80ca736734d73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do compile }
// { dg-options "-fgnu-tm -O" }

class InputStream
{
        public:
//        __attribute__((transaction_safe))
        virtual unsigned int readUint32 () = 0;
};

class Building
{
        public:
        __attribute__((transaction_safe))
        Building (InputStream *stream);
};

Building::Building (InputStream *stream)
{
        stream->readUint32 (); /* { dg-error "InputStream::readUint32" } */
}