https://bugs.llvm.org/show_bug.cgi?id=49086
Bug ID: 49086
Summary: Wrong offset of bit-field with explicit alignment
Product: clang
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
Consider
struct A {
char c;
long l:56 __attribute__((aligned(2)));
char d;
};
int f(void) {
return __builtin_offsetof(struct A, d);
}
GCC returns 15, Clang returns 9 on the x86_64-unknown-linux-gnu target.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs