[LLVMbugs] [Bug 2274] New: another possible code generation error

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri May 2 09:52:47 PDT 2008


http://llvm.org/bugs/show_bug.cgi?id=2274

           Summary: another possible code generation error
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu


Using recent svn, targeting x86-32, running on Ubuntu Feisty, this program
produces different output at -O0 and -O1:

#include <stdio.h>

static unsigned long
div_rhs (long rhs)
{
  if (rhs == 0)
    return 1;
  return rhs;
}

void func_38 (unsigned int p_39);

void func_38 (unsigned int p_39)
{
  unsigned long tmp___0 = div_rhs (-1583256716);
   if (p_39 / tmp___0)
    {
      printf ("foo\n");
    }
  else
    {
      printf ("bar\n");
    }
}

int main (void)
{
  func_38 (-1);
  return 0;
}


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list