Hi all,

This patch fixes an ICE that we encounter when building gcc on arm targets.
The jump table reorganisation exposed a bug in the backend. This fixes it
by using next_active_insn instead of next_real_insn when looking for the
diff vector in the jump table handling code. (Thanks to Steven Bosscher for
the tip).

A separate aarch64 patch is coming soon separately.

Tested arm-none-eabi on qemu and confirmed that the build for
arm-none-linux-gnueabi is fixed.
Since the PR affects both arm and aarch64 I put a testcase into gcc.dg.

Ok for trunk?

Thanks,
Kyrill

gcc/ChangeLog
2013-04-03  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>

        PR target/56809
        * config/arm/arm.c (is_jump_table): Use next_active_insn instead of
        next_real_insn.
        (thumb1_output_casesi): Likewise.
        (thumb2_output_casesi): Likewise.

gcc/testsuite/ChangeLog
2013-04-03  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>

        PR target/56809
        * gcc.dg/pr56809.c: New testcase.

Attachment: pr56809_arm.patch
Description: Binary data

Reply via email to