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

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-01-24
                 CC|                            |law at redhat dot com
     Ever confirmed|0                           |1

--- Comment #5 from Jeffrey A. Law <law at redhat dot com> ---
In the reduced testcase we have:

;;   basic block 3, loop depth 1, count 10737436510031 (estimated locally),
maybe hot
;;    prev block 2, next block 4, flags: (NEW, REACHABLE, VISITED)
;;    pred:       2 [always]  count:1073741826 (estimated locally)
(FALLTHRU,EXECUTABLE)
;;                5 [always]  count:10737436510031 (estimated locally)
(FALLTHRU,DFS_BACK,EXECUTABLE)
  # da_6 = PHI <0B(2), _7(5)>
  _5 = operator new (8, db_4(D));
  MEM[(struct  &)_5] ={v} {CLOBBER};
  _8 = &MEM[(struct e *)_5].cm;
  a::d::e::cq (_5);
  _9 = a::d::e::co (_5);
  a::d::e::cl::cl (_8, _9, D.3228);
  cp_10 = da_6->cm.r;
  if (cp_10 != 0B)
    goto <bb 4>; [53.47%]
  else
    goto <bb 5>; [46.53%]

THe warning seems warranted to me.  The location as has been pointed out in
other comments is totally bogus.


Similarly for the full testcase:

;;   basic block 4, loop depth 1
;;    pred:       3
;;                7
  # __first$_M_current_2 = PHI <0B(3), _47(7)>
  # __cur_38 = PHI <_50(3), __cur_48(7)>
  MEM[(struct  &)__cur_38] ={v} {CLOBBER};
  _41 = &__cur_38->D.22571._M_local_buf;
  MEM[(struct  &)__cur_38] ={v} {CLOBBER};
  MEM[(struct _Alloc_hider *)__cur_38]._M_p = _41;
  _42 = MEM[(const struct basic_string *)__first$_M_current_2];
  _43 = &MEM[(const struct basic_string
*)__first$_M_current_2].D.22571._M_local_buf;
  if (_42 == _43)
    goto <bb 5>; [30.00%]
  else
    goto <bb 6>; [70.00%]
;;    succ:       5
;;                6

Reply via email to