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/33259] limited range of remainder operation can prove loop runs at most once



------- Comment #3 from pinskia at gcc dot gnu dot org  2008-12-27 07:18 -------
Confirmed, simple testcase for this really:
int f(int a)
{
  int b = a % 3;
  return b > 4 || b < -4;
}

This should always return false as b can be proved to be in between -2 and 2.

for unsigned mod, the range is [0, C].


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |
 GCC target triplet|i686-pc-linux-gnu           |
           Keywords|                            |missed-optimization
   Last reconfirmed|0000-00-00 00:00:00         |2008-12-27 07:18:40
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33259


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