1 /* { dg-do assemble } */
2 /* { dg-additional-options "-Wno-return-type" } */
4 /* Minimized from the testcase in PR c++/44473; mangling of decimal types
5 did not include CV qualifiers. */
14 typedef float __decfloat32 __attribute__ ((mode (SD)));
15 explicit decimal32 (float __r):__val (__r) {}
21 template <typename _BI1, typename _BI2>
22 _BI2 copy_backward (_BI1 __first, _BI2 __result);
27 template <typename _Iterator, typename _Container>
28 class __normal_iterator
31 explicit __normal_iterator (const _Iterator & __i) {}
32 const _Iterator & base () const {}
35 template <typename _IteratorL, typename _IteratorR, typename _Container>
36 bool operator== (const __normal_iterator <_IteratorL, _Container> &__lhs,
37 const __normal_iterator <_IteratorR, _Container> &__rhs)
39 return __lhs.base () == __rhs.base ();
42 template <typename _Tp>
47 typedef const _Tp *const_pointer;
48 template <typename _Tp1>
51 typedef new_allocator <_Tp1> other;
58 template <typename _Tp>
59 class allocator:public __gnu_cxx::new_allocator <_Tp> {};
61 template <typename _Tp, typename _Alloc>
64 typedef typename _Alloc::template rebind <_Tp>::other _Tp_alloc_type;
65 struct _Vector_impl:public _Tp_alloc_type
67 typename _Tp_alloc_type::pointer _M_finish;
69 public: _Vector_impl _M_impl;
72 template <typename _Tp, typename _Alloc = std::allocator <_Tp> >
73 class vector:protected _Vector_base <_Tp, _Alloc>
75 typedef _Vector_base <_Tp, _Alloc> _Base;
76 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
78 typedef _Tp value_type;
79 typedef typename _Tp_alloc_type::pointer pointer;
80 typedef typename _Tp_alloc_type::const_pointer const_pointer;
81 typedef __gnu_cxx::__normal_iterator <pointer, vector> iterator;
82 typedef __gnu_cxx::__normal_iterator <const_pointer, vector>
84 const_iterator begin () const;
87 return iterator (this->_M_impl._M_finish);
89 const_iterator end () const
91 return const_iterator (this->_M_impl._M_finish);
95 return begin () == end ();
97 void push_back (const value_type & __x)
99 _M_insert_aux (end ());
101 void _M_insert_aux (iterator __position);
104 template <typename _Tp, typename _Alloc>
105 void vector <_Tp, _Alloc>::_M_insert_aux (iterator __position)
107 std::copy_backward (__position.base (), this->_M_impl._M_finish - 1);
111 std::vector <std::decimal::decimal32> vec;
116 return (vec.empty ()) ? 1 : 0;
122 vec.push_back (std::decimal::decimal32 (0));