/* { dg-do assemble } */ /* Minimized from the testcase in PR c++/44473; mangling of decimal types did not include CV qualifiers. */ namespace std { namespace decimal { class decimal32 { public: typedef float __decfloat32 __attribute__ ((mode (SD))); explicit decimal32 (float __r):__val (__r) {} private: __decfloat32 __val; }; }; template _BI2 copy_backward (_BI1 __first, _BI2 __result); } namespace __gnu_cxx { template class __normal_iterator { public: explicit __normal_iterator (const _Iterator & __i) {} const _Iterator & base () const {} }; template bool operator== (const __normal_iterator <_IteratorL, _Container> &__lhs, const __normal_iterator <_IteratorR, _Container> &__rhs) { return __lhs.base () == __rhs.base (); } template class new_allocator { public: typedef _Tp *pointer; typedef const _Tp *const_pointer; template struct rebind { typedef new_allocator <_Tp1> other; }; }; } namespace std { template class allocator:public __gnu_cxx::new_allocator <_Tp> {}; template struct _Vector_base { typedef typename _Alloc::template rebind <_Tp>::other _Tp_alloc_type; struct _Vector_impl:public _Tp_alloc_type { typename _Tp_alloc_type::pointer _M_finish; }; public: _Vector_impl _M_impl; }; template > class vector:protected _Vector_base <_Tp, _Alloc> { typedef _Vector_base <_Tp, _Alloc> _Base; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; public: typedef _Tp value_type; typedef typename _Tp_alloc_type::pointer pointer; typedef typename _Tp_alloc_type::const_pointer const_pointer; typedef __gnu_cxx::__normal_iterator iterator; typedef __gnu_cxx::__normal_iterator const_iterator; const_iterator begin () const; iterator end () { return iterator (this->_M_impl._M_finish); } const_iterator end () const { return const_iterator (this->_M_impl._M_finish); } bool empty () const { return begin () == end (); } void push_back (const value_type & __x) { _M_insert_aux (end ()); } void _M_insert_aux (iterator __position); }; template void vector <_Tp, _Alloc>::_M_insert_aux (iterator __position) { std::copy_backward (__position.base (), this->_M_impl._M_finish - 1); } } std::vector vec; int foo () { return (vec.empty ()) ? 1 : 0; } bool bar () { vec.push_back (std::decimal::decimal32 (0)); }