This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ARM patch: Fix PR44787/44788


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

Attachment: 44788.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]