https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15596
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|rguenth at gcc dot gnu.org |pinskia at gcc dot
gnu.org
Target Milestone|8.4 |11.0
--- Comment #32 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Mine for GCC 11. I have patches which improve this a lot.
The problem right now is the padding.
I have an idea where we initialize all structs non-addressed local variables
that have a non VOIDmode right before their first use.
Kinda like init-regs does on the RTL but a little more complex.
That is having:
bitstr fun(int s, int l)
{
bitstr res;
*(int*)&res = 0;
res.a = s;
res.b = 1;
res.c = 0;
res.d = l;
return res;
}
Will produce better code always :).