https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78436
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The over-sized bitfield isn't really needed for this, making it more severe:
struct S {
long int : 23;
long int a : 24;
long int b : 10;
long int c : 24;
signed char d : 8;
} s;
__attribute__((noinline, noclone)) void
foo ()
{
s.d = 0;
s.c = -1193165L;
}
int
main ()
{
foo ();
if (s.d != 0)
__builtin_abort ();
return 0;
}
Indeed, I think the bug is in encode_tree_to_bitpos, still debugging where
exactly.