------- Comment #19 from ebotcazou at gcc dot gnu dot org 2008-01-09 11:02 ------- > It seems that this should work too: bitsize is 8 in this example IIRC, so > copy_mode would be byte_mode, which is what we need here. Additionally > using word_mode when we can seems worthwhile too.
OK, thanks. > I believe it's impossible that TYPE_ALIGN is neither a multiple of word_mode > nor a number for which mode_for_size ever returns BLKmode (i.e. either it > returns BLKmode, but then only for very large aligns, which are multiples > of word_mode, or it will return something != BLKmode, which we then > can use). Yes, TYPE_ALIGN is supposed to be always a power of 2 if < BITS_PER_WORDS. > So, with that "argumentation" I think this would work, except for my > probably theoretical fear from comment #9, that the mode argument for > extract_bit_field is only a suggestion. In your patch, yes, in mine, no, that's what I call "forcing" the mode. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31309