[LLVMbugs] [Bug 9998] New: likely wrong code bug

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon May 23 18:20:07 PDT 2011


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

           Summary: likely wrong code bug
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu, chenyang at cs.utah.edu


[regehr at gamow tmp025]$ clang -O0 small.c -o small
[regehr at gamow tmp025]$ ./small
1
[regehr at gamow tmp025]$ clang -O1 small.c -o small
[regehr at gamow tmp025]$ ./small
0
[regehr at gamow tmp025]$ gcc -O1 small.c -o small
[regehr at gamow tmp025]$ ./small
1
[regehr at gamow tmp025]$ clang -v
clang version 3.0 (trunk 131944)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr at gamow tmp025]$ cat small.c
int printf (const char *, ...);

struct S0
{
  signed f0:1;
};

struct S0 g_122 = {
  1,
};

unsigned g_626;
int
func_55 (int p_60)
{
  unsigned long l_373 = 0x6546E4C6CD30E57BLL;
  if (g_122.f0 > l_373)
    p_60 = 1;
  return p_60;
}

int
main (void)
{
  g_626 = func_55 (0);
  printf ("%u\n", g_626);
  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