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 middle-end/17894] New: [miscompile] div/compare folding incorrect


It looks like there is a bug in fold_div_compare.  It turns the expression in
this function:

int X(int Y) { return (X/-10) < 1; }

int "Y <= 9", which is incorrect for many X's, including X=20.

-Chris

-- 
           Summary: [miscompile] div/compare folding incorrect
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: sayle at gcc dot gnu dot org
        ReportedBy: sabre at nondot dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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