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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |wrong-code
   Last reconfirmed|                            |2017-09-05
                 CC|                            |marxin at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot 
gnu.org
     Ever confirmed|0                           |1
            Summary|O2 optimisation on amd64    |[5/6/7/8 Regression] O2
                   |leads to error              |optimisation on amd64 leads
                   |                            |to error
   Target Milestone|---                         |8.0

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r221406, which is IPA ICF related revision.
ICF is responsible for following merge:

void FooBase<T>::payload(std::__cxx11::wstring&, std::__cxx11::wstring&) [with
T = FooImpl] (struct FooBase * const this, struct wstring & result1, struct
wstring & result2)
{
  <bb 2> [100.00%]:
  std::__cxx11::basic_string<wchar_t>::assign (result1_3(D), "r");
  std::__cxx11::basic_string<wchar_t>::assign (result2_4(D), "r");
  return;

}


void FooImpl::real_payload(std::__cxx11::wstring&, std::__cxx11::wstring&)
(struct FooImpl * const this, struct wstring & result1, struct wstring &
result2)
{
  <bb 2> [100.00%]:
  std::__cxx11::basic_string<wchar_t>::assign (result1_2(D), "r");
  std::__cxx11::basic_string<wchar_t>::assign (result2_3(D), "r");
  return;

}

Which should be fine as both functions do not touch this pointer. I'll
investigate more tomorrow.
Sorry for the breakage.

Reply via email to