public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/33779]  New: [4.3 Regression] folds unsigned multiplication == 0 to true
@ 2007-10-15 13:13 rguenth at gcc dot gnu dot org
  2007-10-15 13:24 ` [Bug middle-end/33779] " rguenth at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-10-15 13:13 UTC (permalink / raw)
  To: gcc-bugs

int foo(int i)
{
  if (((unsigned)(i + 1)) * 4 == 0)
    return 1;
  return 0;
}

extern void abort(void);
int main()
{
  if (foo(0x3fffffff) == 0)
    abort ();
  return 0;
}


This goes wrong in extract_muldiv and is exposed by folding X * C CMP 0 to
X CMP 0 for undefined overflow.


-- 
           Summary: [4.3 Regression] folds unsigned multiplication == 0 to
                    true
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-10-31 12:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-15 13:13 [Bug middle-end/33779] New: [4.3 Regression] folds unsigned multiplication == 0 to true rguenth at gcc dot gnu dot org
2007-10-15 13:24 ` [Bug middle-end/33779] " rguenth at gcc dot gnu dot org
2007-10-15 13:31 ` rguenth at gcc dot gnu dot org
2007-10-15 13:32 ` rguenth at gcc dot gnu dot org
2007-10-19 16:31 ` janis at gcc dot gnu dot org
2007-10-22  8:43 ` pinskia at gcc dot gnu dot org
2007-10-27 16:43 ` tromey at gcc dot gnu dot org
2007-10-27 17:29 ` rguenth at gcc dot gnu dot org
2007-10-27 17:30 ` rguenth at gcc dot gnu dot org
2007-10-31 12:33 ` rguenth at gcc dot gnu dot org
2007-10-31 12:34 ` rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).