https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68470
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code Known to work| |4.8.4 Summary|Internal Compiler Error |[4.9/5/6 Regression] |observed by g++-4.9.2 and a |Internal Compiler Error |few other versions |observed by g++-4.9.2 and a |(reported to Debian) |few other versions | |(reported to Debian) --- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- It is the same issue, but the testcase came out a bit smaller: trippels@CFARM-IUT-TLSE3 ~ % cat cc.ii template <typename...> using _Require = int; template <typename _Alloc> struct A { typedef decltype(0) pointer; template <typename _Tp> static _Require<> _S_destroy(_Alloc, _Tp *__p) { __p->~_Tp(); } static void deallocate(_Alloc, pointer, int); template <class _Tp> static void destroy(_Alloc __a, _Tp __p) { _S_destroy(__a, __p); } }; template <typename _Tp> struct B { typedef _Tp *pointer; }; template <typename _Alloc> struct _Vector_base { typedef _Alloc _Tp_alloc_type; typedef typename _Tp_alloc_type::pointer pointer; struct G : _Tp_alloc_type { pointer _M_finish; }; ~_Vector_base() { if (_M_deallocate___p) A<_Tp_alloc_type>::deallocate(_M_impl, 0, _M_deallocate___n); } G _M_impl; pointer _M_deallocate___p; int _M_deallocate___n; }; template <typename _Tp, typename _Alloc = B<_Tp>> struct H : _Vector_base<_Alloc> { int size(); void back(); void pop_back() { A<_Alloc>::destroy(this->_M_impl, this->_M_impl._M_finish); } }; struct C { virtual void PopClip(); }; struct I : C { void PopClip(); H<int> mTiles; H<H<unsigned>> mClippedOutTilesStack; }; void abort() __attribute__((__noreturn__)); struct D { C *mRawPtr; C *operator->() { if (__builtin_expect(mRawPtr != 0, 0)) abort(); } }; struct { D mDrawTarget; } a; void I::PopClip() { for (; mTiles.size();) a.mDrawTarget->PopClip(); mClippedOutTilesStack.back(); mClippedOutTilesStack.pop_back(); } trippels@CFARM-IUT-TLSE3 ~ % g++ -O2 -c cc.ii cc.ii: In member function ‘virtual void I::PopClip()’: cc.ii:59:1: error: statement uses released SSA name: } ^ # .MEM_31 = VDEF <.MEM> MEM[(struct &)_19] ={v} {CLOBBER}; The use of _19 should have been replaced cc.ii:59:1: internal compiler error: cannot update SSA form