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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


[regehr@gamow tmp025]$ clang -O0 small.c -o small
[regehr@gamow tmp025]$ ./small
1
[regehr@gamow tmp025]$ clang -O1 small.c -o small
[regehr@gamow tmp025]$ ./small
0
[regehr@gamow tmp025]$ gcc -O1 small.c -o small
[regehr@gamow tmp025]$ ./small
1
[regehr@gamow tmp025]$ clang -v
clang version 3.0 (trunk 131944)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr@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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to