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

--- Comment #1 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
with current trunk we get this in test.cpp.176t.cplxlower0:

static void std::_Destroy_aux<<anonymous> >::__destroy(_ForwardIterator,
_ForwardIterator) [with _ForwardIterator = std::basic_string<char>*; bool
<anonymous> = false] (struct basic_string * __first, struct basic_string *
__last)
{
  struct basic_string * D.17011;
  struct basic_string * _7;

  <bb 2>:
  # __first_1 = PHI <__first_3(D)(0), __first_9(3)>
  if (__first_1 == __last_5(D))
    goto <bb 4>;
  else
    goto <bb 3>;

  <bb 3>:
  _7 = std::__addressof<std::basic_string<char> > (__first_1);
  std::_Destroy<std::basic_string<char> > (_7);
  __first_9 = __first_1 + 8;
  goto <bb 2>;

  <bb 4>:
  return;

which is tranformed to this in test.cpp.178t.tsan0:

static void std::_Destroy_aux<<anonymous> >::__destroy(_ForwardIterator,
_ForwardIterator) [with _ForwardIterator = std::basic_string<char>*; bool
<anonymous> = false] (struct basic_string * __first, struct basic_string *
__last)
{
  struct basic_string * D.17011;
  struct basic_string * _7;
  void * _10;

  <bb 2>:
  # __first_1 = PHI <__first_3(D)(0), __first_9(3)>
  _10 = __builtin_return_address (0);
  __builtin___tsan_func_entry (_10);
  if (__first_1 == __last_5(D))
    goto <bb 4>;
  else
    goto <bb 3>;

  <bb 3>:
  _7 = std::__addressof<std::basic_string<char> > (__first_1);
  std::_Destroy<std::basic_string<char> > (_7);
  __first_9 = __first_1 + 8;
  goto <bb 2>;

  <bb 4>:
  __builtin___tsan_func_exit ();
  return;

}


but with r217669 reverted, we get in test.cpp.176t.cplxlower0:

static void std::_Destroy_aux<<anonymous> >::__destroy(_ForwardIterator,
_ForwardIterator) [with _ForwardIterator = std::basic_string<char>*; bool
<anonymous> = false] (struct basic_string * __first, struct basic_string *
__last)
{
  struct basic_string * D.17027;
  struct basic_string * _7;

  <bb 2>:
  goto <bb 4>;

  <bb 3>:
  _7 = std::__addressof<std::basic_string<char> > (__first_1);
  std::_Destroy<std::basic_string<char> > (_7);
  __first_9 = __first_1 + 8;

  <bb 4>:
  # __first_1 = PHI <__first_3(D)(2), __first_9(3)>
  if (__first_1 != __last_5(D))
    goto <bb 3>;
  else
    goto <bb 5>;

  <bb 5>:
  return;

}

which is transformed to this in test.cpp.178t.tsan0:

static void std::_Destroy_aux<<anonymous> >::__destroy(_ForwardIterator,
_ForwardIterator) [with _ForwardIterator = std::basic_string<char>*; bool
<anonymous> = false] (struct basic_string * __first, struct basic_string *
__last)
{
  struct basic_string * D.17027;
  struct basic_string * _7;
  void * _10;

  <bb 2>:
  _10 = __builtin_return_address (0);
  __builtin___tsan_func_entry (_10);
  goto <bb 4>;

  <bb 3>:
  _7 = std::__addressof<std::basic_string<char> > (__first_1);
  std::_Destroy<std::basic_string<char> > (_7);
  __first_9 = __first_1 + 8;

  <bb 4>:
  # __first_1 = PHI <__first_3(D)(2), __first_9(3)>
  if (__first_1 != __last_5(D))
    goto <bb 3>;
  else
    goto <bb 5>;

  <bb 5>:
  __builtin___tsan_func_exit ();
  return;

}

Reply via email to