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

Andrew Macleod <amacleod at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aldyh at redhat dot com,
                   |                            |amacleod at redhat dot com

--- Comment #3 from Andrew Macleod <amacleod at redhat dot com> ---
We should be able to handle this in GCC 12 . The WIP relation support in ranger
currently is showing:

    <bb 2> :
    _1 = i_6(D) < len_7(D);
    _2 = i_6(D) >= j_8(D);
    _3 = _1 & _2;
    if (_3 != 0)
      goto <bb 3>; [INV]
    else
      goto <bb 6>; [INV]

=========== BB 3 ============
len_7(D)        size_t [1, +INF]
j_8(D)  size_t VARYING
Relational : (i_6(D) >= j_8(D))
Relational : (i_6(D) < len_7(D))
    <bb 3> :
    if (len_7(D) > j_8(D))
      goto <bb 4>; [INV]
    else
      goto <bb 5>; [INV]

So once I get the transitive queries of relations working, we should be able to
recognize
  len_7 > i_6 >= j_8 
and then the condition will fold trivially eliminating the call to exit().

Reply via email to