http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57896
--- Comment #9 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Vittorio Zecca from comment #6) > As an aside, in gcc 4.8.1 source code, before line 6995 of gcc/expr.c I put > > printf("\nexpr.c:6995 value->code=%d NUM_RTX_CODE=%d\n",(int) > value->code,NUM_RTX_CODE); > gcc_assert((int) value->code < NUM_RTX_CODE); > > and I get an ICE there because value->code is 34816 and NUM_RTX_CODE is 145 > > Indeed at line 6995 ARITHMETIC_P (value) accesses rtx_class[(int) > value->code] > but the array rtx_class has only NUM_RTX_CODE elements. > However, I do not know how this is relevant to this issue. This one points to infrastructure problem. Adding a debug patch: --cut here-- Index: explow.c =================================================================== --- explow.c (revision 207910) +++ explow.c (working copy) @@ -186,8 +186,13 @@ plus_constant (enum machine_mode mode, rtx x, HOST } if (c != 0) - x = gen_rtx_PLUS (mode, x, GEN_INT (c)); + { + rtx z = GEN_INT (c); + printf ("cccccc, %li\n", c); + debug_rtx (z); + x = gen_rtx_PLUS (mode, x, z); + } if (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF) return x; else if (all_constant) --cut here-- ~/gcc-build-48/gcc/cc1 pr57896.c ... __get_cpuidcccccc, -4 (const_int -4 [0xfffffffffffffffc]) cccccc, -16 (const_int -16 [0xfffffffffffffff0]) cccccc, -24 (const_int -24 [0xffffffffffffffe8]) cccccc, -32 (const_int -32 [0xffffffffffffffe0]) cccccc, -40 (??? bad code 47104 ) pr57896.c: In function ‘__get_cpuid’: pr57896.c:5:5: internal compiler error: in emit_move_insn_1, at expr.c:3437 int __get_cpuid (unsigned int __level, unsigned int *__eax, unsigned int *__ebx, unsigned int *__ecx, unsigned int *__edx) { ^ 0x62d74d emit_move_insn_1(rtx_def*, rtx_def*) /home/uros/gcc-svn/branches/gcc-4_8-branch/gcc/expr.c:3437 0x62d7b5 emit_move_insn(rtx_def*, rtx_def*) /home/uros/gcc-svn/branches/gcc-4_8-branch/gcc/expr.c:3535 Please note that the debug patch only encloses GEN_INT (...)