This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch RFA] SH: glibc build failure


Hi,

I've got a segfault during glibc build with the mainline gcc on
sh4-unknown-linux-gnu:

/exp/ldroot/dodes/xsh-gcc-orig/gcc/xgcc -B/exp/ldroot/dodes/xsh-gcc-orig/gcc/ iso-2022-cn-ext.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g   -fPIC    -I../include -I. -I/exp/ldroot/dodes/xsh-libc-gcc4/iconvdata -I.. -I../libio -I../nptl -I/exp/ldroot/dodes/xsh-libc-gcc4 -I../sysdeps/sh/elf -I../nptl/sysdeps/unix/sysv/linux/sh/sh4 -I../nptl/sysdeps/unix/sysv/linux/sh -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../nptl/sysdeps/unix/sysv -I../nptl/sysdeps/unix -I../nptl/sysdeps/sh -I../nptl/sysdeps/generic -I../sysdeps/unix/sysv/linux/sh/sh4 -I../sysdeps/unix/sysv/linux/sh -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/sh -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/sh/sh4/fpu -I../sysdeps/sh/sh4 -I../sysdeps/sh -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../!
 sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem /exp/ldroot/dodes/xsh-gcc/gcc/include -isystem /usr/local/sh4-unknown-linux-gnu/include -D_LIBC_REENTRANT -D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC -DSHARED     -DNOT_IN_libc -o /exp/ldroot/dodes/xsh-libc-gcc4/iconvdata/iso-2022-cn-ext.os -MD -MP -MF /exp/ldroot/dodes/xsh-libc-gcc4/iconvdata/iso-2022-cn-ext.os.dt -MT /exp/ldroot/dodes/xsh-libc-gcc4/iconvdata/iso-2022-cn-ext.os

../iconv/skeleton.c: In function 'gconv':
../iconv/skeleton.c:792: internal compiler error: Segmentation fault

It doesn't fail with 20051003 compiler at least, so this is a recent
regression.  It looks that sh.c:fixup_mova calls recog_memoized for
a note like

(note 29699 26871 7484 ("iso-2022-cn-ext.c") 7696)

in the above case.  Then recog_memoized calls recog with the PATTERN
of the above note as the first argument and segfault follows.

The attached patch is not to call recog_memoized for notes in
fixup_mova.  Tested with bootstrap and the toplevel "make -k check"
on sh4-unknown-linux-gnu.

Regards,
	kaz
--
:ADDPATCH target:

2005-10-19  Kaz Kojima  <kkojima@gcc.gnu.org>

	* config/sh/sh.c (fixup_mova): Skip notes.

diff -uprN ORIG/gcc/gcc/config/sh/sh.c LOCAL/gcc/gcc/config/sh/sh.c
--- ORIG/gcc/gcc/config/sh/sh.c	2005-10-10 13:33:41.000000000 +0900
+++ LOCAL/gcc/gcc/config/sh/sh.c	2005-10-18 11:36:20.000000000 +0900
@@ -3406,7 +3406,8 @@ fixup_mova (rtx mova)
 	  gcc_assert (worker
 		      && GET_CODE (worker) != CODE_LABEL
 		      && GET_CODE (worker) != JUMP_INSN);
-	} while (recog_memoized (worker) != CODE_FOR_casesi_worker_1);
+	} while (GET_CODE (worker) == NOTE
+		 || recog_memoized (worker) != CODE_FOR_casesi_worker_1);
       wpat = PATTERN (worker);
       wpat0 = XVECEXP (wpat, 0, 0);
       wpat1 = XVECEXP (wpat, 0, 1);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]