http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58970
--- Comment #12 from Bernd Edlinger <bernd.edlinger at hotmail dot de> --- (In reply to Jakub Jelinek from comment #11) > (In reply to Bernd Edlinger from comment #10) > > but this should'nt be neccessary then? > > > > if (bitoffset > *bitpos) > > { > > HOST_WIDE_INT adjust = bitoffset - *bitpos; > > - > > gcc_assert ((adjust % BITS_PER_UNIT) == 0); > > - gcc_assert (*offset != NULL_TREE); > > > > *bitpos += adjust; > > - *offset > > - = size_binop (MINUS_EXPR, *offset, size_int (adjust / BITS_PER_UNIT)); > > + if (*offset == NULL_TREE) > > + *offset = size_int (-adjust / BITS_PER_UNIT); > > + else > > + *offset > > + = size_binop (MINUS_EXPR, *offset, size_int (adjust / BITS_PER_UNIT)); > > *bitstart = 0; > > } > > Can you prove it isn't necessary? I mean, *bitpos could still be smaller > than bitoffset, even when not negative, say with some packed+aligned > structures containing bitfields or similar. NULL_TREE *offset is the same > thing as zero at that spot, just perhaps less efficient in that case, so I > think if we can't prove it will not be hit, it is easy to handle it. hmm, my english... I meant the change here is not necessary, because after the if (*bitpos < 0) {...}, *offset can no longer be NULL, and I'd leave the assertion untouched.