[PATCH] Fix PR middle-end/86705

Jozef Lawrynowicz jozef.l@mittosystems.com
Tue Jul 31 18:37:00 GMT 2018


On 30/07/18 14:29, Richard Biener wrote:
> On Sun, Jul 29, 2018 at 6:27 PM Jozef Lawrynowicz
> <jozef.l@mittosystems.com> wrote:
>> pr45678-2.c ICEs for msp430-elf with -mlarge, because an alignment of
>> POINTER_SIZE is attempted. POINTER_SIZE with -mlarge is 20-bits, so further
>> code in the middle-end that expects this to be a power or 2 causes odd
>> alignments to be set, in this case eventually resulting in an ICE.
>>
>> The test ICEs on gcc-7-branch, gcc-8-branch, and current trunk. It
>> successfully builds on gcc-6-branch.
>> The failure is caused by r235172.
>>
>> Successfully bootstrapped and regtested the attached patch for
>> x86-64-pc-linux-gnu, and msp430-elf with -mlarge, on trunk.
>>
>> Ok for gcc-7-branch, gcc-8-branch and trunk?
> I wonder if most (if not all) places you touch want to use
> get_mode_alignment (Pmode) instead?  (or ptr_mode)
>
> Anyhow, the patch is otherwise obvious though factoring
> the thing might be nice (thus my suggestion above...)
>
> Richard.

Thanks for the suggestion, using GET_MODE_ALIGNMENT does seem like a neater
idea.
After retesting, I went ahead and committed the below patch onto trunk, will
backport to gcc-7/8-branch later.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr86705-2.patch
Type: text/x-patch
Size: 1509 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180731/174abbcd/attachment.bin>


More information about the Gcc-patches mailing list