This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/68470] Internal Compiler Error observed by g++-4.9.2 and a few other versions (reported to Debian)


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68470

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|amd86                       |
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-11-21
          Component|c++                         |middle-end
                 CC|                            |trippels at gcc dot gnu.org
               Host|amd86                       |
     Ever confirmed|0                           |1
      Known to fail|                            |4.9.2, 5.1.0, 6.0
           Severity|major                       |normal

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Confirmed for the smaller testcase. Further reduced:

markus@x4 /tmp % cat bar.ii
template <typename...> using _Require = void;
template <typename _Alloc> struct A {
  template <typename _Tp> static typename _Tp::pointer _S_pointer_helper(_Tp
*);
  typedef decltype(_S_pointer_helper((_Alloc *)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> class B {
public:
  typedef _Tp *pointer;
  typedef _Tp value_type;
};
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, _M_deallocate___p,
                                    _M_deallocate___n);
  }
  G _M_impl;
  int _M_deallocate___n;
  pointer _M_deallocate___p;
};
template <typename _Tp, typename _Alloc = B<_Tp>>
class H : _Vector_base<_Alloc> {
  typedef _Alloc _Tp_alloc_type;
public:
  int size();
  typename _Tp_alloc_type::value_type operator[](int);
  void back();
  void pop_back() {
    A<_Tp_alloc_type>::destroy(this->_M_impl, this->_M_impl._M_finish);
  }
};
class C {
public:
  virtual void PopClip();
};
void abort() __attribute__((__noreturn__));
class D {
  C *mRawPtr;
public:
  C *operator->() {
    if (__builtin_expect(mRawPtr != 0, 0))
      abort();
  }
};
struct F {
  D mDrawTarget;
};
class I : C {
  void PopClip();
  H<F> mTiles;
  H<H<int>> mClippedOutTilesStack;
};
void I::PopClip() {
  for (int i; mTiles.size();)
    mTiles[i].mDrawTarget->PopClip();
  mClippedOutTilesStack.back();
  mClippedOutTilesStack.pop_back();
}

markus@x4 /tmp % g++ -c -O2 bar.ii
bar.ii: In member function âvirtual void I::PopClip()â:
bar.ii:70:1: error: statement uses released SSA name:
 }
 ^

# .MEM_37 = VDEF <.MEM>
MEM[(struct  &)_25] ={v} {CLOBBER};
The use of _25 should have been replaced
bar.ii:70:1: internal compiler error: cannot update SSA form
0xd55490 update_ssa(unsigned int)
        ../../gcc/gcc/tree-into-ssa.c:3190
0xbfebd7 execute_function_todo
        ../../gcc/gcc/passes.c:1926
0xbff5fb execute_todo
        ../../gcc/gcc/passes.c:2010

I'm still reducing the big testcase. It might be a different issue.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]