aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/opt/dump1.C
blob: d90061feee2f4b918f51171eb7aa946e6f25fc4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
// PR c++/57102
// { dg-options "-O2 -fno-inline -fdump-final-insns" }
// { dg-do compile { target c++11 } }
// { dg-final cleanup-saved-temps }

namespace std
{
  typedef __SIZE_TYPE__ size_t;
  typedef __PTRDIFF_TYPE__ ptrdiff_t;
}
extern "C++" {
  void* operator new(std::size_t, void* __p) noexcept;
}
namespace std __attribute__ ((__visibility__ ("default")))
{
  template<typename _Tp, _Tp __v>
    struct integral_constant
    {
      static constexpr _Tp value = __v;
      typedef integral_constant<_Tp, __v> type;
    };
  typedef integral_constant<bool, true> true_type;
  typedef integral_constant<bool, false> false_type;
  template<bool, typename, typename>
    struct conditional;
  template<typename...>
    struct __or_;
  template<typename _B1, typename _B2>
    struct __or_<_B1, _B2>
    : public conditional<_B1::value, _B1, _B2>::type
    {};
  template<typename _B1, typename _B2, typename _B3, typename... _Bn>
    struct __or_<_B1, _B2, _B3, _Bn...>
    : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type
    {};
  template<typename...>
    struct __and_;
  template<typename _B1, typename _B2>
    struct __and_<_B1, _B2>
    : public conditional<_B1::value, _B2, _B1>::type
    {};
  template<typename _Pp>
    struct __not_
    : public integral_constant<bool, !_Pp::value>
    {};
  template<typename _Tp>
    struct __success_type
    { typedef _Tp type; };
  template<typename>
    struct remove_cv;
  template<typename>
    struct __is_void_helper
    : public false_type {};
  template<typename _Tp>
    struct is_void
    : public __is_void_helper<typename remove_cv<_Tp>::type>::type
    {};
  template<typename>
    struct __is_integral_helper
    : public true_type {};
  template<typename _Tp>
    struct is_integral
    : public __is_integral_helper<typename remove_cv<_Tp>::type>::type
    {};
  template<typename>
    struct is_array
    : public false_type {};
  template<typename>
    struct is_lvalue_reference
    : public false_type {};
  template<typename>
    struct is_rvalue_reference
    : public false_type {};
  template<typename>
    struct __is_member_object_pointer_helper
    : public false_type {};
  template<typename _Tp>
    struct is_member_object_pointer
    : public __is_member_object_pointer_helper<
    typename remove_cv<_Tp>::type>::type
    {};
  template<typename>
    struct __is_member_function_pointer_helper
    : public false_type {};
  template<typename _Tp>
    struct is_member_function_pointer
    : public __is_member_function_pointer_helper<
    typename remove_cv<_Tp>::type>::type
    {};
  template<typename _Tp>
    struct is_enum
    : public integral_constant<bool, __is_enum(_Tp)>
    {};
  template<typename>
    struct is_function
    : public false_type {};
  template<typename _Tp>
    struct is_reference
    : public __or_<is_lvalue_reference<_Tp>,
                   is_rvalue_reference<_Tp>>::type
    {};
  template<typename _Tp>
    struct __is_member_pointer_helper
    : public false_type {};
  template<typename _Tp>
    struct is_member_pointer
    : public __is_member_pointer_helper<typename remove_cv<_Tp>::type>::type
    {};
  template<typename>
    struct is_const
    : public false_type {};
  template<typename>
    struct is_volatile
    : public false_type {};
  template<typename>
    struct add_rvalue_reference;
  template<typename _Tp>
    typename add_rvalue_reference<_Tp>::type declval() noexcept;
  struct __do_is_nary_constructible_impl
  {
    template<typename _Tp, typename... _Args, typename
             = decltype(_Tp(declval<_Args>()...))>
      static true_type __test(int);
  };
  template<typename _Tp, typename... _Args>
    struct __is_nary_constructible_impl
    : public __do_is_nary_constructible_impl
    {
      typedef decltype(__test<_Tp, _Args...>(0)) type;
    };
  template<typename _Tp, typename... _Args>
    struct __is_nary_constructible
    : public __is_nary_constructible_impl<_Tp, _Args...>::type
    {};
  template<typename _Tp, typename... _Args>
    struct __is_constructible_impl
    : public __is_nary_constructible<_Tp, _Args...>
    {};
  template<typename _Tp, typename... _Args>
    struct is_constructible
    : public __is_constructible_impl<_Tp, _Args...>::type
    {};
  template<typename, typename>
    struct is_same
    : public true_type {};
  template<typename _From, typename _To,
           bool = __or_<is_void<_From>, is_function<_To>,
                        is_array<_To>>::value>
    struct __is_convertible_helper
    {
       template<typename _To1>
 static void __test_aux(_To1);
      template<typename _From1, typename _To1,
        typename = decltype(__test_aux<_To1>(std::declval<_From1>()))>
 static true_type
 __test(int);
      typedef decltype(__test<_From, _To>(0)) type;
    };
  template<typename _From, typename _To>
    struct is_convertible
    : public __is_convertible_helper<_From, _To>::type
    {};
  template<typename _Tp>
    struct remove_const
    { typedef _Tp type; };
  template<typename _Tp>
    struct remove_volatile
    { typedef _Tp type; };
  template<typename _Tp>
    struct remove_cv
    {
      typedef typename
      remove_const<typename remove_volatile<_Tp>::type>::type type;
    };
  template<typename _Tp>
    struct remove_reference
    { typedef _Tp type; };
  template<typename _Tp>
    struct remove_reference<_Tp&>
    { typedef _Tp type; };
  template<typename _Tp,
           bool = __and_<__not_<is_reference<_Tp>>,
                         __not_<is_void<_Tp>>>::value>
    struct __add_rvalue_reference_helper
    { typedef _Tp type; };
  template<typename _Tp>
    struct add_rvalue_reference
    : public __add_rvalue_reference_helper<_Tp>
    {};
  template<typename _Unqualified, bool _IsConst, bool _IsVol>
    struct __cv_selector;
  template<typename _Unqualified>
    struct __cv_selector<_Unqualified, false, false>
    { typedef _Unqualified __type; };
  template<typename _Qualified, typename _Unqualified,
    bool _IsConst = is_const<_Qualified>::value,
    bool _IsVol = is_volatile<_Qualified>::value>
    class __match_cv_qualifiers
    {
      typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match;
    public:
      typedef typename __match::__type __type;
    };
  template<typename _Tp>
    struct __make_unsigned
    { typedef _Tp __type; };
  template<typename _Tp,
    bool _IsInt = is_integral<_Tp>::value,
    bool _IsEnum = is_enum<_Tp>::value>
    class __make_unsigned_selector;
  template<typename _Tp>
    class __make_unsigned_selector<_Tp, true, false>
    {
      typedef __make_unsigned<typename remove_cv<_Tp>::type> __unsignedt;
      typedef typename __unsignedt::__type __unsigned_type;
      typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned;
    public:
      typedef typename __cv_unsigned::__type __type;
    };
  template<typename _Tp>
    struct make_unsigned
    { typedef typename __make_unsigned_selector<_Tp>::__type type; };
  template<typename _Tp, typename>
    struct __remove_pointer_helper
    { typedef _Tp type; };
  template<typename _Tp>
    struct remove_pointer
    : public __remove_pointer_helper<_Tp, typename remove_cv<_Tp>::type>
    {};
  template<typename _Up,
    bool _IsArray = is_array<_Up>::value,
    bool _IsFunction = is_function<_Up>::value>
    struct __decay_selector;
  template<typename _Up>
    struct __decay_selector<_Up, false, false>
    { typedef typename remove_cv<_Up>::type __type; };
  template<typename _Tp>
    class decay
    {
      typedef typename remove_reference<_Tp>::type __remove_type;
    public:
      typedef typename __decay_selector<__remove_type>::__type type;
    };
  template<bool, typename _Tp = void>
    struct enable_if
    { typedef _Tp type; };
  template<typename... _Cond>
    using _Require = typename enable_if<__and_<_Cond...>::value>::type;
  template<bool _Cond, typename _Iftrue, typename _Iffalse>
    struct conditional
    { typedef _Iftrue type; };
  template<typename _Signature>
    class result_of;
  template<bool, bool, typename _Functor, typename... _ArgTypes>
    struct __result_of_impl
    ;
  struct __result_of_other_impl
  {
    template<typename _Fn, typename... _Args>
      static __success_type<decltype(
      std::declval<_Fn>()(std::declval<_Args>()...)
      )> _S_test(int);
  };
  template<typename _Functor, typename... _ArgTypes>
    struct __result_of_impl<false, false, _Functor, _ArgTypes...>
    : private __result_of_other_impl
    {
      typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type;
    };
  template<typename _Functor, typename... _ArgTypes>
    struct result_of<_Functor(_ArgTypes...)>
    : public __result_of_impl<
        is_member_object_pointer<
          typename remove_reference<_Functor>::type
        >::value,
        is_member_function_pointer<
          typename remove_reference<_Functor>::type
        >::value,
     _Functor, _ArgTypes...
      >::type
    {};
  template<typename _Tp>
    constexpr _Tp&&
    forward(typename std::remove_reference<_Tp>::type& __t) noexcept
    { return static_cast<_Tp&&>(__t); }
  template<typename _Tp>
    constexpr typename std::remove_reference<_Tp>::type&&
    move(_Tp&& __t) noexcept
    { return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); }
  template<std::size_t _Int, class _Tp>
    class tuple_element;
  struct allocator_arg_t {};
  constexpr allocator_arg_t allocator_arg = allocator_arg_t();
  template<typename _Tp>
    struct __add_ref
    { typedef _Tp& type; };
  template<std::size_t _Idx, typename... _Elements>
    struct _Tuple_impl;
  template<std::size_t _Idx, typename _Head, typename... _Tail>
    struct _Tuple_impl<_Idx, _Head, _Tail...>
    {};
  template<typename... _Elements>
    class tuple : public _Tuple_impl<0, _Elements...>
    {};
  template<typename _Head, typename... _Tail>
    struct tuple_element<0, tuple<_Head, _Tail...> >
    {
      typedef _Head type;
    };
  template<std::size_t __i, typename... _Elements>
    typename __add_ref<
                      typename tuple_element<__i, tuple<_Elements...>>::type
                    >::type
    get(tuple<_Elements...>& __t) noexcept;
  template<std::size_t... _Indexes>
    struct _Index_tuple
    {};
  template<std::size_t _Num>
    struct _Build_index_tuple
    {
      typedef _Index_tuple<> __type;
    };
  template<typename _Functor, typename... _Args>
    typename enable_if<
      (!is_member_pointer<_Functor>::value
       && !is_function<typename remove_pointer<_Functor>::type>::value),
      typename result_of<_Functor(_Args&&...)>::type
    >::type
    __invoke(_Functor& __f, _Args&&... __args)
    {
      return __f(std::forward<_Args>(__args)...);
    }

  template<typename _Tp>
    class reference_wrapper
    {
    public:
      _Tp&
      get() const noexcept
      {}
      template<typename... _Args>
 typename result_of<_Tp&(_Args&&...)>::type
 operator()(_Args&&... __args) const
 {
   return __invoke(get(), std::forward<_Args>(__args)...);
 }
    };
  template<typename _Tp>
    inline reference_wrapper<_Tp>
    ref(_Tp& __t) noexcept
    {}
  template<typename _Tp>
    struct _Maybe_wrap_member_pointer
    {
      typedef _Tp type;
    };
  template<typename _Signature>
    struct _Bind_simple;
  template<typename _Callable, typename... _Args>
    struct _Bind_simple<_Callable(_Args...)>
    {
      typedef typename result_of<_Callable(_Args...)>::type result_type;
      result_type
      operator()()
      {
        typedef typename _Build_index_tuple<sizeof...(_Args)>::__type _Indices;
        return _M_invoke(_Indices());
      }
      template<std::size_t... _Indices>
        typename result_of<_Callable(_Args...)>::type
        _M_invoke(_Index_tuple<_Indices...>)
        {
          return std::forward<_Callable>(std::get<0>(_M_bound))(
              std::forward<_Args>(std::get<_Indices+1>(_M_bound))...);
        }
      std::tuple<_Callable, _Args...> _M_bound;
    };
  template<typename _Func, typename... _BoundArgs>
    struct _Bind_simple_helper
    {
      typedef _Maybe_wrap_member_pointer<typename decay<_Func>::type>
        __maybe_type;
      typedef typename __maybe_type::type __func_type;
      typedef _Bind_simple<__func_type(typename decay<_BoundArgs>::type...)>
        __type;
    };
  template<typename _Callable, typename... _Args>
    typename _Bind_simple_helper<_Callable, _Args...>::__type
    __bind_simple(_Callable&& __callable, _Args&&... __args)
  ;
  union _Any_data
  ;
  template<typename _Functor>
    inline _Functor&
    __callable_functor(_Functor& __f)
    ;
  template<typename _Signature>
    class function;
  class _Function_base
  {
    template<typename _Functor>
      class _Base_manager
      {
      protected:
 static _Functor*
 _M_get_pointer(const _Any_data& __source)
 ;
      };
  };
  template<typename _Signature, typename _Functor>
    class _Function_handler;
  template<typename _Res, typename _Functor, typename... _ArgTypes>
    class _Function_handler<_Res(_ArgTypes...), _Functor>
    : public _Function_base::_Base_manager<_Functor>
    {
      typedef _Function_base::_Base_manager<_Functor> _Base;
    public:
      static _Res
      _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
      {
 return (*_Base::_M_get_pointer(__functor))(
     std::forward<_ArgTypes>(__args)...);
      }
    };
  template<typename _Res, typename... _ArgTypes>
    class function<_Res(_ArgTypes...)>
    {
      typedef _Res _Signature_type(_ArgTypes...);
      template<typename _Functor>
 using _Invoke = decltype(__callable_functor(std::declval<_Functor&>())
     (std::declval<_ArgTypes>()...) );
      template<typename _CallRes, typename _Res1>
 struct _CheckResult
 : is_convertible<_CallRes, _Res1> {};
      template<typename _Functor>
 using _Callable = _CheckResult<_Invoke<_Functor>, _Res>;
      template<typename _Cond, typename _Tp>
 using _Requires = typename enable_if<_Cond::value, _Tp>::type;
    public:
      template<typename _Functor,
        typename = _Requires<_Callable<_Functor>, void>>
 function(_Functor);
      typedef _Res (*_Invoker_type)(const _Any_data&, _ArgTypes...);
      _Invoker_type _M_invoker;
  };
  template<typename _Res, typename... _ArgTypes>
    template<typename _Functor, typename>
      function<_Res(_ArgTypes...)>::
      function(_Functor __f)
      {
 typedef _Function_handler<_Signature_type, _Functor> _My_handler;
{
     _M_invoker = &_My_handler::_M_invoke;
   }
      }
  template<typename _Ptr>
    class __ptrtr_pointer_to
    ;
  template<typename _Ptr>
    struct pointer_traits : __ptrtr_pointer_to<_Ptr>
    {};
  template<typename _Tp>
    struct pointer_traits<_Tp*>
    {
      typedef ptrdiff_t difference_type;
    };
  template<typename _Alloc, typename _Tp>
    class __alloctr_rebind_helper
    {
      template<typename, typename>
        static constexpr bool
        _S_chk(...)
        { return false; }
    public:
      static const bool __value = _S_chk<_Alloc, _Tp>(nullptr);
    };
  template<typename _Alloc, typename _Tp,
           bool = __alloctr_rebind_helper<_Alloc, _Tp>::__value>
    struct __alloctr_rebind;
  template<template<typename, typename...> class _Alloc, typename _Tp,
            typename _Up, typename... _Args>
    struct __alloctr_rebind<_Alloc<_Up, _Args...>, _Tp, false>
    {
      typedef _Alloc<_Tp, _Args...> __type;
    };
  template<typename _Alloc>
    struct allocator_traits
    {
      typedef _Alloc allocator_type;
      typedef typename _Alloc::value_type value_type; static value_type* _S_pointer_helper(...); typedef decltype(_S_pointer_helper((_Alloc*)0)) __pointer; public:
      typedef __pointer pointer; static typename pointer_traits<pointer>::difference_type _S_difference_type_helper(...); typedef decltype(_S_difference_type_helper((_Alloc*)0)) __difference_type; public:
      typedef __difference_type difference_type; static typename make_unsigned<difference_type>::type _S_size_type_helper(...); typedef decltype(_S_size_type_helper((_Alloc*)0)) __size_type; public:
      typedef __size_type size_type; public:
      template<typename _Tp>
        using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::__type;
      template<typename _Tp>
        using rebind_traits = allocator_traits<rebind_alloc<_Tp>>;
      template<typename _Tp, typename... _Args>
 struct __construct_helper
 {
   template<typename>
     static false_type __test(...);
   typedef decltype(__test<_Alloc>(0)) type;
   static const bool value = type::value;
 };
      template<typename _Tp, typename... _Args>
 static typename
 enable_if<__and_<__not_<__construct_helper<_Tp, _Args...>>,
    is_constructible<_Tp, _Args...>>::value, void>::type
        _S_construct(_Alloc&, _Tp* __p, _Args&&... __args)
 { ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); }
      static pointer
      allocate(_Alloc& __a, size_type __n)
      ;
      template<typename _Tp, typename... _Args>
 static auto construct(_Alloc& __a, _Tp* __p, _Args&&... __args)
 -> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...))
 { _S_construct(__a, __p, std::forward<_Args>(__args)...); }
    };
}
namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
{
  enum _Lock_policy { _S_single, _S_mutex, _S_atomic };
  static const _Lock_policy __default_lock_policy =
  _S_atomic;
}
namespace std __attribute__ ((__visibility__ ("default")))
{
  template<typename _Tp>
    struct default_delete
    ;
  template <typename _Tp, typename _Dp = default_delete<_Tp> >
    class unique_ptr
    {
      class _Pointer
      {
 template<typename _Up>
   static _Tp* __test(...);
 typedef typename remove_reference<_Dp>::type _Del;
      public:
 typedef decltype(__test<_Del>(0)) type;
      };
    public:
      typedef typename _Pointer::type pointer;
      typedef _Tp element_type;
      template<typename _Up, typename _Ep, typename = _Require<
        is_convertible<typename unique_ptr<_Up, _Ep>::pointer, pointer>,
        typename conditional<is_reference<_Dp>::value,
        is_same<_Ep, _Dp>,
        is_convertible<_Ep, _Dp>>::type>>
 unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
      ;
  };
}
namespace __gnu_cxx
{
  template<typename _Tp>
    struct __aligned_buffer
    {};
}
namespace std __attribute__ ((__visibility__ ("default")))
{
  using __gnu_cxx::_Lock_policy;
  using __gnu_cxx::__default_lock_policy;
  template<_Lock_policy _Lp = __default_lock_policy>
    class _Sp_counted_base
    {};
  template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
    class __shared_ptr;
  struct _Sp_make_shared_tag {};
  template<typename _Tp, typename _Alloc, _Lock_policy _Lp>
    class _Sp_counted_ptr_inplace final : public _Sp_counted_base<_Lp>
    {
      struct _Impl
      : public _Alloc
      {
 _Impl(_Alloc __a) : _Alloc(__a), _M_ptr() {}
 _Tp* _M_ptr;
      };
    public:
      template<typename... _Args>
 _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
 : _M_impl(__a), _M_storage()
 {
   allocator_traits<_Alloc>::construct(__a, _M_impl._M_ptr,
       std::forward<_Args>(__args)...);
 }
      _Impl _M_impl;
      __gnu_cxx::__aligned_buffer<_Tp> _M_storage;
    };
  template<_Lock_policy _Lp>
    class __shared_count
    {
    public:
      template<typename _Tp, typename _Alloc, typename... _Args>
 __shared_count(_Sp_make_shared_tag, _Tp*, const _Alloc& __a,
         _Args&&... __args)
 {
   typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type;
   typedef typename allocator_traits<_Alloc>::template
     rebind_traits<_Sp_cp_type> _Alloc_traits;
   typename _Alloc_traits::allocator_type __a2(__a);
   _Sp_cp_type* __mem = _Alloc_traits::allocate(__a2, 1);
   try
     {
       _Alloc_traits::construct(__a2, __mem, std::move(__a),
      std::forward<_Args>(__args)...);
     }
   catch(...)
     {}
 }
    };
  template<typename _Tp, _Lock_policy _Lp>
    class __shared_ptr
    {
    public:
      template<typename _Tp1, typename = typename
        std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
 __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
 : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount)
 {}
      template<typename _Alloc, typename... _Args>
 __shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a,
       _Args&&... __args)
 : _M_ptr(), _M_refcount(__tag, (_Tp*)0, __a,
    std::forward<_Args>(__args)...)
 {}
      _Tp* _M_ptr;
      __shared_count<_Lp> _M_refcount;
    };
  template<typename _Tp>
    class shared_ptr : public __shared_ptr<_Tp>
    {
    public:
      template<typename _Tp1, typename = typename
        std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
 shared_ptr(const shared_ptr<_Tp1>& __r) noexcept
        : __shared_ptr<_Tp>(__r) {}
      template<typename _Alloc, typename... _Args>
 shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a,
     _Args&&... __args)
 : __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...)
 {}
    };
  template<typename _Tp, typename _Alloc, typename... _Args>
    inline shared_ptr<_Tp>
    allocate_shared(const _Alloc& __a, _Args&&... __args)
    {
      return shared_ptr<_Tp>(_Sp_make_shared_tag(), __a,
        std::forward<_Args>(__args)...);
    }
}
namespace std __attribute__ ((__visibility__ ("default")))
{
  template<typename _Signature>
    class packaged_task;
  struct __future_base
  {
    struct _Result_base
    {
      struct _Deleter
      ;
    };
    template<typename _Res>
      struct _Result : _Result_base
      {
 typedef _Res result_type;
    };
    template<typename _Res>
      using _Ptr = unique_ptr<_Res, _Result_base::_Deleter>;
    template<typename _Res, typename _Alloc>
      struct _Result_alloc final : _Result<_Res>, _Alloc
      {};
    template<typename _Res, typename _Allocator>
      static _Ptr<_Result_alloc<_Res, _Allocator>>
      _S_allocate_result(const _Allocator& __a)
    ;
    template<typename _Signature>
      class _Task_state_base;
    template<typename _Fn, typename _Alloc, typename _Signature>
      class _Task_state;
    template<typename _Res_ptr,
      typename _Res = typename _Res_ptr::element_type::result_type>
      struct _Task_setter;
    template<typename _Res_ptr, typename _BoundFn>
      static _Task_setter<_Res_ptr>
      _S_task_setter(_Res_ptr& __ptr, _BoundFn&& __call)
      {
 return _Task_setter<_Res_ptr>{ __ptr, std::ref(__call) };
      }
  };
  template<typename _Ptr_type, typename _Res>
    struct __future_base::_Task_setter
    {
      _Ptr_type& _M_result;
      std::function<_Res()> _M_fn;
    };
  template<typename _Res, typename... _Args>
    struct __future_base::_Task_state_base<_Res(_Args...)>
    {
      template<typename _Alloc>
 _Task_state_base(const _Alloc& __a)
 : _M_result(_S_allocate_result<_Res>(__a))
 {}
      typedef __future_base::_Ptr<_Result<_Res>> _Ptr_type;
      _Ptr_type _M_result;
    };
  template<typename _Fn, typename _Alloc, typename _Res, typename... _Args>
    struct __future_base::_Task_state<_Fn, _Alloc, _Res(_Args...)> final
    : __future_base::_Task_state_base<_Res(_Args...)>
    {
      _Task_state(_Fn&& __fn, const _Alloc& __a)
      : _Task_state_base<_Res(_Args...)>(__a), _M_impl(std::move(__fn), __a)
      {}
      virtual void
      _M_run(_Args... __args)
      {
 auto __boundfn = std::__bind_simple(std::ref(_M_impl._M_fn),
     _S_maybe_wrap_ref(std::forward<_Args>(__args))...);
 auto __setter = _S_task_setter(this->_M_result, std::move(__boundfn));
      }
      struct _Impl : _Alloc
      {
 _Impl(_Fn&& __fn, const _Alloc& __a)
   : _Alloc(__a), _M_fn(std::move(__fn)) {}
 _Fn _M_fn;
      } _M_impl;
    };
    template<typename _Signature, typename _Fn, typename _Alloc>
      static shared_ptr<__future_base::_Task_state_base<_Signature>>
      __create_task_state(_Fn&& __fn, const _Alloc& __a)
      {
 typedef __future_base::_Task_state<_Fn, _Alloc, _Signature> _State;
 return std::allocate_shared<_State>(__a, std::move(__fn), __a);
      }
  template<typename _Task, typename _Fn, bool
    = is_same<_Task, typename decay<_Fn>::type>::value>
    struct __constrain_pkgdtask
    { typedef void __type; };
  template<typename _Res, typename... _ArgTypes>
    class packaged_task<_Res(_ArgTypes...)>
    {
      typedef __future_base::_Task_state_base<_Res(_ArgTypes...)> _State_type;
      shared_ptr<_State_type> _M_state;
    public:
      template<typename _Fn, typename _Alloc, typename = typename
        __constrain_pkgdtask<packaged_task, _Fn>::__type>
 packaged_task(allocator_arg_t, const _Alloc& __a, _Fn&& __fn)
 : _M_state(__create_task_state<_Res(_ArgTypes...)>(
      std::forward<_Fn>(__fn), __a))
 {}
    };
}
namespace __gnu_test
{
  template <class Tp>
    struct SimpleAllocator
    {
      typedef Tp value_type;
      SimpleAllocator() ;
      template <class T>
        SimpleAllocator(const SimpleAllocator<T>& other) ;
    };
}
using std::packaged_task;
using std::allocator_arg;
__gnu_test::SimpleAllocator<int> a;
packaged_task<int()> p(allocator_arg, a, []() { return 1; });