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: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
[reg...@n1 ~]$ clang -O1 foo.c -o foo
[reg...@n1 ~]$ ./foo
g_99.f0 = 1
[reg...@n1 ~]$ clang -O2 foo.c -o foo
[reg...@n1 ~]$ ./foo
g_99.f0 = 0
[reg...@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;
}
[reg...@n1 ~]$ clang -v
clang version 2.9 (trunk 120726)
Target: i386-pc-linux-gnu
Thread model: posix
[reg...@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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs