This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/52904] -Wstrict-overflow false alarm with bounded loop


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

kugan at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |kugan at gcc dot gnu.org
         Resolution|---                         |WORKSFORME

--- Comment #9 from kugan at gcc dot gnu.org ---
Incorrect warning is gone from the latest trunk build. VRP is now able to
detect the correct range. This bug can now be closed.

----------------------------------------------------
Value ranges after VRP:

channel_8: [1, 1023]  EQUIVALENCES: { channel_10 } (1 elements)
channel_10: [1, 1024]
channel_15: [0, 1023]
.MEM_16: VARYING


Removing basic block 5
wait_reading_process_output ()
{
  int channel;
  int nfds;

  <bb 2>:

  <bb 3>:
  # channel_15 = PHI <channel_10(3), 0(2)>
  foo (channel_15);
  channel_10 = channel_15 + 1;
  if (channel_10 != 1024)
    goto <bb 3>;
  else
    goto <bb 4>;

  <bb 4>:
  return 0;

}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]