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

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
OK, what it does is:
Determining dynamic type for call: _50 = OBJ_TYPE_REF(_47;(struct
basic_streambuf)&ostr._M_stringbuf->13) (&ostr._M_stringbuf, 88);
  Starting walk at: _46 = MEM[(struct basic_streambuf *)&ostr +
8B]._vptr.basic_streambuf;
  instance pointer: &ostr._M_stringbuf  Outer instance pointer: ostr offset: 0
(bits) vtbl reference: MEM[(struct basic_streambuf *)&ostr +
8B]._vptr.basic_streambuf
  Checking constructor call:
std::__cxx11::basic_ostringstream<char>::basic_ostringstream (&ostr, 16);
  Recording type: struct basic_ostringstream at offset 0                        
  Determined dynamic type.                                                      
  Targets of polymorphic call of type 5:struct basic_streambuf token 13         
    Outer type (dynamic):struct basic_ostringstream

Now the code is:

  <bb 2>:
  std::__cxx11::basic_ostringstream<char>::basic_ostringstream (&ostr, 16);
  MEM[(struct  &)&iter] ={v} {CLOBBER};
  MEM[(struct  &)&iter] ={v} {CLOBBER};
  iter._M_sbuf = &ostr._M_stringbuf;
  iter._M_failed = 0;
  _30 = iter._M_failed;
  if (_30 != 0)
    goto <bb 8>;
  else
    goto <bb 3>;

  <bb 3>:
  _32 = iter._M_sbuf;
  _33 = MEM[(char_type * *)_32 + 40B];
  _34 = MEM[(char_type * *)_32 + 48B];
  _35 = _33 < _34;
  _36 = (long int) _35;
  _37 = _36;
  if (_33 < _34)
    goto <bb 4>;
  else
    goto <bb 5>;

  <bb 4>:
  *_33 = 88;
  _38 = MEM[(char_type * *)_32 + 40B];
  _39 = _38 + 1;
  MEM[(char_type * *)_32 + 40B] = _39;
  goto <bb 6>;

  <bb 5>:
  _46 = MEM[(struct basic_streambuf *)_32]._vptr.basic_streambuf;
  _47 = MEM[(int (*__vtbl_ptr_type) () *)_46 + 104B];
  _50 = OBJ_TYPE_REF(_47;(struct basic_streambuf)_32->13) (_32, 88);

so the analysis looks OK to me.

Reply via email to