public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/24142] New: VRP miscompiles unzip inflate.c
@ 2005-09-30  9:58 rguenth at gcc dot gnu dot org
  2005-09-30 10:20 ` [Bug tree-optimization/24142] " rguenth at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-09-30  9:58 UTC (permalink / raw)
  To: gcc-bugs

For the following testcase reduced from inflate.c

int bar(void);
int foobar(void);
static unsigned dbits = 6;
int foo(void)
{
  int retval;
  unsigned bd;
  unsigned nl;

  bd = dbits;
  retval = bar();
  if (retval == 1)
    retval = 0;
  if (bd == 0 && nl > 257)
    retval = 1;
  if (retval)
    return retval;

  return foobar();
}

VRP removes the call to foobar() because it thinks it can fold the
last comparison:
Folding predicate retval_2 != 0 to 1

-- 
           Summary: VRP miscompiles unzip inflate.c
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
OtherBugsDependingO 23968
             nThis:


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


^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <bug-24142-10053@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2005-10-02 20:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-30  9:58 [Bug tree-optimization/24142] New: VRP miscompiles unzip inflate.c rguenth at gcc dot gnu dot org
2005-09-30 10:20 ` [Bug tree-optimization/24142] " rguenth at gcc dot gnu dot org
2005-09-30 11:54 ` [Bug tree-optimization/24142] [4.1 regression] " belyshev at depni dot sinp dot msu dot ru
2005-09-30 13:46 ` steven at gcc dot gnu dot org
2005-10-01 15:24 ` belyshev at depni dot sinp dot msu dot ru
2005-10-01 15:26 ` belyshev at depni dot sinp dot msu dot ru
2005-10-01 15:27 ` dnovillo at gcc dot gnu dot org
     [not found] <bug-24142-10053@http.gcc.gnu.org/bugzilla/>
2005-10-02 20:16 ` cvs-commit at gcc dot gnu dot org
2005-10-02 20:17 ` dnovillo 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).