OSDN Git Service

Merge from transactional-memory branch.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / tm / pr47573.C
1 // { dg-do compile }
2 // { dg-options "-fgnu-tm" }
3
4 template<typename _Tp> class allocator
5 {
6         public:
7         allocator() { }
8 };
9 extern template class allocator<char>;
10
11 template<typename _Alloc = allocator<char> > class basic_string
12 {
13         public:
14         _Alloc _M_dataplus;
15
16         __attribute__((transaction_safe))
17         basic_string() : _M_dataplus(_Alloc())
18         {
19         }
20 };
21
22 int getStringHeight()
23 {
24         basic_string<> tmp;
25 }