From: wilson Date: Mon, 8 Dec 2003 22:39:51 +0000 (+0000) Subject: Fix IA-64 glibc ICE X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=b97d1165b8e672d820a6d0718202586b2a86e417 Fix IA-64 glibc ICE PR target/13132 * expmed.c (extract_bit_field): Only call mode_for_size for scalar integer modes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74443 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ee250296f5f..4e39db5a269 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-12-08 James E Wilson + + PR target/13132 + * expmed.c (extract_bit_field): Only call mode_for_size for scalar + integer modes. + 2003-12-08 Nathanael Nerode * doc/install.texi: Revert change of Dec 7; gcc is still a 2.13 diff --git a/gcc/expmed.c b/gcc/expmed.c index d93be934be3..98a26a14c1e 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -1079,13 +1079,18 @@ extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, If that's wrong, the solution is to test for it and set TARGET to 0 if needed. */ - mode1 = (VECTOR_MODE_P (tmode) - ? mode - : mode_for_size (bitsize, GET_MODE_CLASS (tmode), 0)); + /* Only scalar integer modes can be converted via subregs. There is an + additional problem for FP modes here in that they can have a precision + which is different from the size. mode_for_size uses precision, but + we want a mode based on the size, so we must avoid calling it for FP + modes. */ + mode1 = (SCALAR_INT_MODE_P (tmode) + ? mode_for_size (bitsize, GET_MODE_CLASS (tmode), 0) + : mode); if (((bitsize >= BITS_PER_WORD && bitsize == GET_MODE_BITSIZE (mode) && bitpos % BITS_PER_WORD == 0) - || (mode_for_size (bitsize, GET_MODE_CLASS (tmode), 0) != BLKmode + || (mode1 != BLKmode /* ??? The big endian test here is wrong. This is correct if the value is in a register, and if mode_for_size is not the same mode as op0. This causes us to get unnecessarily