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

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
Just a quick note from what I see in GDB.  The warning is issued by the 2nd run
of the waccess pass (-fdump-tree-waccess2) for the following statement in bb 22
in pread():

  iftmp.21_88 = __pread_alias (_50, _82, _81, _79);

_81's range reported by range_query::range_of_expr (vr, exp, stmt) is [58,
ULONG_MAX], matching the range in the warning.

A partial output of debug_ranger() for the function is below.  I must be
reading it wrong because  I don't see what the range above is derived from.

=========== BB 19 ============
Imports: recvd_78  _83  
Exports: _51  recvd_78  recvd.17_80  _83  _94  _116  _125  
_83     [irange] UNDEFINED
    <bb 19> [local count: 169058114]:
    if (_83 == 18446744073709551615)
      goto <bb 22>; [34.00%]
    else
      goto <bb 20>; [66.00%]

19->22  (T) _83 :       [irange] UNDEFINED
19->20  (F) _83 :       [irange] UNDEFINED

=========== BB 20 ============
Imports: _81  _83  
Exports: _81  _83  _85  _86  _87  
         _85 : _81(I)  _83(I)  
         _86 : _81(I)  _83(I)  _85  
         _87 : _81(I)  _83(I)  _85  _86  
_81     [irange] long unsigned int VARYING
_83     [irange] long unsigned int VARYING
    <bb 20> [local count: 280636469]:
    _85 = _81 <= _83;
    _86 = (int) _85;
    _87 = __builtin_constant_p (_86);
    if (_87 != 0)
      goto <bb 21>; [50.00%]
    else
      goto <bb 24>; [50.00%]

_86 : [irange] int [0, 1] NONZERO 0x1
_87 : [irange] int [0, 0] NONZERO 0x0
20->21  (T) _81 :       [irange] UNDEFINED
20->21  (T) _83 :       [irange] UNDEFINED
20->21  (T) _85 :       [irange] UNDEFINED
20->21  (T) _86 :       [irange] UNDEFINED
20->21  (T) _87 :       [irange] UNDEFINED
20->24  (F) _86 :       [irange] int [0, 1] NONZERO 0x1
20->24  (F) _87 :       [irange] int [0, 0] NONZERO 0x0

=========== BB 21 ============
Imports: recvd_78  _81  _83  
Exports: _51  recvd_78  recvd.17_80  _81  _83  _94  _116  _125  
_81     [irange] UNDEFINED
_83     [irange] UNDEFINED
    <bb 21> [local count: 140318235]:
    if (_81 <= _83)
      goto <bb 22>; [50.00%]
    else
      goto <bb 23>; [50.00%]

21->22  (T) _81 :       [irange] UNDEFINED
21->22  (T) _83 :       [irange] UNDEFINED
21->23  (F) _81 :       [irange] UNDEFINED
21->23  (F) _83 :       [irange] UNDEFINED

=========== BB 22 ============
    <bb 22> [local count: 127638877]:
    iftmp.21_88 = __pread_alias (_50, _82, _81, _79);
    goto <bb 25>; [100.00%]

Reply via email to