On 17 Nov 2011, at 09:25, Andreas Krebbel wrote:

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);


with this + r181436 on powerpc-darwin9, the ICEs are gone ..
.. but all the struct-layout-1 tests are failing on execute.

Running /GCC/gcc-live-trunk/gcc/testsuite/gcc.dg/compat/struct- layout-1.exp ... FAIL: tmpdir-gcc.dg-struct-layout-1/t001 c_compat_x_tst.o- c_compat_y_tst.o execute FAIL: tmpdir-gcc.dg-struct-layout-1/t002 c_compat_x_tst.o- c_compat_y_tst.o execute FAIL: tmpdir-gcc.dg-struct-layout-1/t003 c_compat_x_tst.o- c_compat_y_tst.o execute FAIL: tmpdir-gcc.dg-struct-layout-1/t004 c_compat_x_tst.o- c_compat_y_tst.o execute FAIL: tmpdir-gcc.dg-struct-layout-1/t005 c_compat_x_tst.o- c_compat_y_tst.o execute FAIL: tmpdir-gcc.dg-struct-layout-1/t006 c_compat_x_tst.o- c_compat_y_tst.o execute FAIL: tmpdir-gcc.dg-struct-layout-1/t007 c_compat_x_tst.o- c_compat_y_tst.o execute FAIL: tmpdir-gcc.dg-struct-layout-1/t008 c_compat_x_tst.o- c_compat_y_tst.o execute

===

(the 22_locale tests seem OK).

with PR50325/C#5 the struct-layout-1 tests were OK (I will re-check that patch in a minute).

Iain

Reply via email to