This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70733] Wrong code with nested structs and bit field.
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Apr 2016 08:03:31 +0000
- Subject: [Bug c++/70733] Wrong code with nested structs and bit field.
- Auto-submitted: auto-generated
- References: <bug-70733-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70733
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
LLVM does effectively
int main() {
b.member.member = 4;
a = -(unsigned long)b.member.member;
if (a != -4)
abort();
and if you write that then GCC behavior agrees with that of LLVM.