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

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Dec 2 11:22:07 PST 2010


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

           Summary: likely wrong code bug
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: All
            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 n1 ~]$ clang -O1 foo.c -o foo
[regehr at n1 ~]$ ./foo
g_99.f0 = 1
[regehr at n1 ~]$ clang -O2 foo.c -o foo
[regehr at n1 ~]$ ./foo
g_99.f0 = 0
[regehr at n1 ~]$ cat foo.c
struct S2 {
   unsigned f0 : 27;
   unsigned f1 : 17;
   signed f2 : 18;
};

struct S2 g_99 = {0,0,0};
struct S2 *g_248 = &g_99;

int printf(const char *format, ...);

int  main(void)
{
    struct S2 l_438 = {1,1,1};
    *g_248 = l_438;
    *g_248 = g_99;
    printf("g_99.f0 = %d\n", g_99.f0);
    return 0;
}
[regehr at n1 ~]$ clang -v
clang version 2.9 (trunk 120726)
Target: i386-pc-linux-gnu
Thread model: posix
[regehr at n1 ~]$

-- 
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