There seems to be wrong code generated when cross-gcc (x86_64->mips) is used to compile gcc for mips target.
Program received signal SIGSEGV, Segmentation fault. 0x004940ac in def_builtin_1 (fncode=BUILT_IN_HUGE_VAL, name=<value optimized out>, fnclass=BUILT_IN_NORMAL, fntype=<value optimized out>, libtype=0x0, both_p=0 '\000', fallback_p=0 '\000', nonansi_p=0 '\000', fnattrs=0x2adc42b8, implicit_p=1 '\001') at /scratch/oe/work/mips-oe-linux-uclibc/gcc-4.5-r4.1+svnr161450/gcc-4.5/gcc/c-common.c:5186 5186 built_in_decls[(int) fncode] = decl; When I debugged through it then I see that in this function def_builtin_1 its trying to access 'fncode' which comes in a0 into function it stores it into s2 and then later it moves it into s5 and it uses s5 later to generate the offset into the array built_in_decls[(int) fncode] but the this move into s5 doesnt happen in all execution paths and it gets a bogus high value into s5 which it thinks is an offset into array and then dies. The case where s5 is not populated correctly is when in following assert (!both_p && fallback_p) is true then it does not have to compute the || and it follows a different execution path. gcc_assert ((!both_p && fallback_p) || !strncmp (name, "__builtin_", strlen ("__builtin_"))); I have attached the objdump output of c-common.o -- Summary: GCC compiled to run on mips platform ICE's in def_builtin_1 () Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: raj dot khem at gmail dot com GCC build triplet: x86_64-linux GCC host triplet: x86_64-linux GCC target triplet: mips-oe-linux-uclibc http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44734