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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |msebor at gcc dot gnu.org
   Last reconfirmed|                            |2021-09-27
             Blocks|                            |88443
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed.  As Martin indicated in comment #1, the UBSAN sanitization is
causing the warning to trigger.  The IL the first instance is issued for is
below (-fdump-tree-strlen):

  if (iter_554 == 0B)
    goto <bb 31>; [0.00%]
  else
    goto <bb 32>; [100.00%]

  <bb 31> [count: 0]:
  __builtin___ubsan_handle_nonnull_arg (&*.Lubsan_data478);

  <bb 32> [local count: 850510933]:
  if (_560 == 0B)
    goto <bb 33>; [0.00%]
  else
    goto <bb 34>; [100.00%]

  <bb 33> [count: 0]:
  __builtin___ubsan_handle_nonnull_arg (&*.Lubsan_data479);

  <bb 34> [local count: 850510933]:                               <<< iter_554
is null
  _565 = MEM <short unsigned int> [(char * {ref-all})_558];
  MEM <short unsigned int> [(char * {ref-all})iter_554] = _565;   <<<
-Wstringop-overflow
  .UBSAN_PTR (iter_554, 2);

The problem is likely a duplicate of one of the existing reports of the same
problem.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443
[Bug 88443] [meta-bug] bogus/missing -Wstringop-overflow warnings

Reply via email to