It seems like you're calculating maxbits correctly now, but an access doesn't necessarily start from the beginning of the sequence of bit-fields, especially given store_split_bit_field. That is,

struct A
{
  int i;
  int j: 32;
  int k: 8;
  char c[2];
};

Here maxbits would be 40, so we decide that it's OK to use SImode to access the word starting with k, and clobber c in the process. Am I wrong?

Jason

Reply via email to