https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92999

--- Comment #1 from Jim Rees <jimreesma at gmail dot com> ---
Reproduced on gcc-9.2 and figured out a fix, though I'm not savvy enough with
this code to say it's a complete fix.

In (gcc-9.2.0 release) gcc/config/arm/arm.c:

6226a6227
>         int ag_mode_size;
6241c6242,6243
<       shift = GET_MODE_SIZE(ag_mode) / GET_MODE_SIZE(SFmode);
---
>         ag_mode_size = MAX (GET_MODE_SIZE (ag_mode), GET_MODE_SIZE (SFmode));
>       shift = ag_mode_size / GET_MODE_SIZE(SFmode);

Prior to the patch, shift becomes 0 when ag_mode is HFmode, which is what
causes every field of the struct to get mapped to the same floating-point
register.

Reply via email to