ARM patch: Fix PR44787/44788

Bernd Schmidt bernds@codesourcery.com
Sat Jul 3 11:24:00 GMT 2010


This fixes an ICE which is caused by reload generating an invalid
instruction.  While reloading a complex addressing mode, it generates

(insn 98 55 59 2 pr44788.c:6 (set (reg:SI 5 r5)
        (plus:SI (mult:SI (reg/v:SI 5 r5 [orig:183 t ] [183])
                (const_int 4 [0x4]))
            (reg/f:SI 13 sp))) 661 {*thumb2_arith_shiftsi} (nil))

There isn't actually anything wrong with this, except the pattern
doesn't allow the stack pointer - but the machine does.  Hence, the
following patch.

I've added the testcase in two places; the copy in gcc.target uses the
compilation flags in the PR (which are necessary to reproduce the bug).

Regression tested on:
Target is arm-none-linux-gnueabi
Host   is i686-pc-linux-gnu

Schedule of variations:
    qemu-system-armv7/arch=armv7-a/thumb
    qemu-system-armv7/thumb
    qemu-system-armv7

Ok?


Bernd
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 44788.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100703/3d6a31a5/attachment.ksh>


More information about the Gcc-patches mailing list