Debian Codegraph @

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

raw
1 // Without comdat support, we don't see the body of the
2 // extern template class constructor, so limit this to
3 // known comdat targets.
4 // { dg-do compile { target comdat_group } }
5 // { dg-options "-fgnu-tm" }
6
7 template<typename _Tp> class allocator
8 {
9 public:
10 allocator() { }
11 };
12 extern template class allocator<char>;
13
14 template<typename _Alloc = allocator<char> > class basic_string
15 {
16 public:
17 _Alloc _M_dataplus;
18
19 __attribute__((transaction_safe))
20 basic_string() : _M_dataplus(_Alloc())
21 {
22 }
23 };
24
25 int getStringHeight()
26 {
27 basic_string<> tmp;
28 return 0;
29 }