http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57896
--- Comment #11 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Uroš Bizjak from comment #10) > (In reply to Vittorio Zecca from comment #5) > > > Adding option -m32 I get ICE in ix86_expand_prologue, at > > config/i386/i386.c:10559 > > I can confirm this with: > > gcc version 4.8.3 20140219 (prerelease) [gcc-4_8-branch revision 207910] > (GCC) > > ~/gcc-build-48/gcc/cc1 -m32 -march=x86-64 pr57896.c This is the same problem, as confirmed by following debug patch: --cut here-- Index: i386.c =================================================================== --- i386.c (revision 207912) +++ i386.c (working copy) @@ -10449,8 +10449,12 @@ ix86_expand_prologue (void) else if (!ix86_target_stack_probe () || frame.stack_pointer_offset < CHECK_STACK_LIMIT) { + rtx x = GEN_INT (-allocate); + + printf ("\nTestP1 %li\n", -allocate); + debug_rtx (x); pro_epilogue_adjust_stack (stack_pointer_rtx, stack_pointer_rtx, - GEN_INT (-allocate), -1, + x, -1, m->fs.cfa_reg == stack_pointer_rtx); } else @@ -10536,6 +10540,7 @@ ix86_expand_prologue (void) gen_frame_mem (word_mode, t)); } } + printf ("\nTestP2 %li %li\n", m->fs.sp_offset, frame.stack_pointer_offset); gcc_assert (m->fs.sp_offset == frame.stack_pointer_offset); /* If we havn't already set up the frame pointer, do so now. */ --cut here-- GEN_INT (...) produces some non-sensical RTX, and INTVAL at the end of pro_epilogue_adjust_stack chokes on it. m->fs.sp_offset = ooffset - INTVAL (offset); m->fs.sp_valid = valid; ~/gcc-build-48/gcc/cc1 -m32 -march=x86-64 pr57896.c ... TestP1 -56 (??? bad code 42752 ) TestP2 -139787679344504 64 pr57896.c: In function ‘__get_cpuid_max’: pr57896.c:4:1: internal compiler error: in ix86_expand_prologue, at config/i386/i386.c:10544 } ^ 0x98fe35 ix86_expand_prologue() /home/uros/gcc-svn/branches/gcc-4_8-branch/gcc/config/i386/i386.c:10544 0xa1ce9a gen_prologue() /home/uros/gcc-svn/branches/gcc-4_8-branch/gcc/config/i386/i386.md:11829 0x673927 thread_prologue_and_epilogue_insns /home/uros/gcc-svn/branches/gcc-4_8-branch/gcc/function.c:5949 0x673927 rest_of_handle_thread_prologue_and_epilogue /home/uros/gcc-svn/branches/gcc-4_8-branch/gcc/function.c:6973