On 11/17/2011 03:44 AM, David Edelsohn wrote:
> Andreas,
> 
> This patch seems to have introduced a failure for all of the
> gcc.dg-struct-layout tests on AIX.
> 
> gcc.dg-struct-layout-1/t001_test.h:8:1: internal compiler error: in
> int_mode_for_mode, at stor-layout.c:424
> 
> After your change, int_mode_for_mode now is passed VOIDmode because
> the rtx is a CONST_INT.

extract_bit_field is only able to deal with regs and mems. For constants it 
should not be
necessary anyway. Could you please test the following patch:

Index: gcc/expmed.c
===================================================================
*** gcc/expmed.c.orig   2011-11-15 20:03:46.000000000 +0100
--- gcc/expmed.c        2011-11-17 09:12:22.487783491 +0100
*************** store_bit_field_1 (rtx str_rtx, unsigned
*** 562,570 ****
            MIN (BITS_PER_WORD, bitsize - i * BITS_PER_WORD);

          /* If the remaining chunk doesn't have full wordsize we have
!            to make that for big endian machines the higher order
!            bits are used.  */
!         if (new_bitsize < BITS_PER_WORD && BYTES_BIG_ENDIAN)
            value_word = extract_bit_field (value_word, new_bitsize, 0,
                                            true, false, NULL_RTX,
                                            BLKmode, word_mode);
--- 562,572 ----
            MIN (BITS_PER_WORD, bitsize - i * BITS_PER_WORD);

          /* If the remaining chunk doesn't have full wordsize we have
!            to make sure that for big endian machines the higher
!            order bits are used.  */
!         if (BYTES_BIG_ENDIAN
!             && GET_MODE (value_word) != VOIDmode
!             && new_bitsize < BITS_PER_WORD)
            value_word = extract_bit_field (value_word, new_bitsize, 0,
                                            true, false, NULL_RTX,
                                            BLKmode, word_mode);

Reply via email to