https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84826
--- Comment #10 from sudi at gcc dot gnu.org --- Author: sudi Date: Thu Mar 22 17:24:41 2018 New Revision: 258777 URL: https://gcc.gnu.org/viewcvs?rev=258777&root=gcc&view=rev Log: [ARM][PR target/84826] Fix ICE in extract_insn, at recog.c:2304 on arm-linux-gnueabi The ICE in the bug report was happening because the macro USE_RETURN_INSN (FALSE) was returning different values at different points in the compilation. This was internally occurring because the function arm_compute_static_chain_stack_bytes () which was dependent on arm_r3_live_at_start_p () was giving a different value after the cond_exec instructions were created in ce3 causing the liveness of r3 to escape up to the start block. The function arm_compute_static_chain_stack_bytes () should really only compute the value once duringepilogue/prologue stage. This pass introduces a new member 'static_chain_stack_bytes' to the target definition of the struct machine_function which gets calculated in expand_prologue and is the value that is returned by arm_compute_static_chain_stack_bytes () beyond that. ChangeLog entries: *** gcc/ChangeLog *** 2018-03-22 Sudakshina Das <sudi....@arm.com> PR target/84826 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes. * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid re-computing once computed. (arm_expand_prologue): Compute machine->static_chain_stack_bytes. (arm_init_machine_status): Initialize machine->static_chain_stack_bytes. *** gcc/testsuite/ChangeLog *** 2018-03-22 Sudakshina Das <sudi....@arm.com> PR target/84826 * gcc.target/arm/pr84826.c: New test. Added: trunk/gcc/testsuite/gcc.target/arm/pr84826.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/arm/arm.c trunk/gcc/config/arm/arm.h trunk/gcc/testsuite/ChangeLog