------- Comment #17 from jakub at gcc dot gnu dot org 2008-10-25 10:47 ------- I'd say this is a bug in emit_group_store, but I'd fear how many ports will break if we touch it.
emit_group_store clearly doesn't care about BLOCK_REG_PADDING if dst is CONCAT, I think the code pretty much assumes that GET_MODE_SIZE (dest_mode) == GET_MODE_SIZE (tmps[i]). If bytepos, adj_bytelen pair pick up just the first or second register of the CONCAT, then it is I think fine, the code falls through into the optional down shift depending on BLOCK_REG_PADDING and store_bit_field which always takes lsb bits from tmps[i]. But for the case where both regs of the CONCAT need to be set, nothing considers BLOCK_REG_PADDING at all. In the GET_MODE_ALIGNMENT (dest_mode) < GET_MODE_ALIGNMENT (tmp_mode) case, it would be enough just to add some offset to the address depending on BLOCK_REG_PADDING, but in the other case we might be even allocating a stack slot smaller than needed. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37316