// PR ipa/63587 // { dg-do compile { target c++11 } } // { dg-options "-O2 -fno-strict-aliasing" } template struct A { }; template struct B { template struct C; }; class D; template class F; struct G { void operator()(const D &, D); }; class D { public: D (int); }; struct H { H (int); }; template class I { typedef _Key key_type; template struct J { _Key_compare _M_key_compare; }; J<_Compare> _M_impl; public: A _M_get_insert_unique_pos (const key_type &); A _M_get_insert_hint_unique_pos (H &); template int _M_emplace_hint_unique (H, _Args &&...); }; template > > class K { typedef _Key key_type; typedef _Key value_type; typedef typename B<_Alloc>::template C _Pair_alloc_type; I _M_t; public: void operator[](key_type) { _M_t._M_emplace_hint_unique (0); } }; template A I<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_unique_pos ( const key_type &p1) { _M_impl._M_key_compare (p1, 0); } template A I<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_hint_unique_pos ( H &) { _M_get_insert_unique_pos (0); } template template int I<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique ( H p1, _Args &&...) { _M_get_insert_hint_unique_pos (p1); } namespace { struct L; } void fn1 () { K a; a[0]; K b; b[0]; }