Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / analyzer / pr94503.C
blobecf7121367d60a40d46236cab17f25009bd224c9
1 // { dg-additional-options "-Wno-analyzer-use-of-uninitialized-value" }
3 template <typename> class allocator {
4 public:
5   allocator(const allocator &);
6   allocator();
7 };
9 template <typename> struct allocator_traits;
10 template <typename _Tp> struct allocator_traits<allocator<_Tp> > {
11   static allocator<_Tp> select_on_container_copy_construction() {
12     return allocator<_Tp>();
13   }
14   static allocator<_Tp> _S_select_on_copy() {
15     return select_on_container_copy_construction();
16   }
19 class basic_string {
20   struct _Alloc_hider {
21     _Alloc_hider(allocator<char>);
22   } _M_dataplus;
24 public:
25   basic_string(basic_string &)
26     : _M_dataplus(allocator_traits<allocator<char> >::_S_select_on_copy()) {}
27 } xxx(xxx);