[Bug c/87691] transparent_union attribute does not work with MODE_PARTIAL_INT

2018-11-20 Thread jozef.l at mittosystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87691 Jozef Lawrynowicz changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/87691] transparent_union attribute does not work with MODE_PARTIAL_INT

2018-11-20 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87691 Martin Liška changed: What|Removed |Added CC||marxin at gcc dot gnu.org --- Comment #11

[Bug c/87691] transparent_union attribute does not work with MODE_PARTIAL_INT

2018-11-07 Thread jozefl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87691 --- Comment #10 from jozefl at gcc dot gnu.org --- Author: jozefl Date: Wed Nov 7 22:06:26 2018 New Revision: 265894 URL: https://gcc.gnu.org/viewcvs?rev=265894&root=gcc&view=rev Log: 2018-11-07 Jozef Lawrynowicz PR c/87691

[Bug c/87691] transparent_union attribute does not work with MODE_PARTIAL_INT

2018-10-23 Thread jozef.l at mittosystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87691 --- Comment #9 from Jozef Lawrynowicz --- Patch submitted: https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01459.html

[Bug c/87691] transparent_union attribute does not work with MODE_PARTIAL_INT

2018-10-23 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87691 --- Comment #8 from rguenther at suse dot de --- On Tue, 23 Oct 2018, jozef.l at mittosystems dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87691 > > --- Comment #7 from Jozef Lawrynowicz --- > (In reply to Richard Biener from

[Bug c/87691] transparent_union attribute does not work with MODE_PARTIAL_INT

2018-10-23 Thread jozef.l at mittosystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87691 --- Comment #7 from Jozef Lawrynowicz --- (In reply to Richard Biener from comment #6) > > I think it's better to, at this place, simply allow MODE_INT or > MODE_PARTIAL_INT > for unions. Allowing MODE_INT is what we'd fall back to anyways and

[Bug c/87691] transparent_union attribute does not work with MODE_PARTIAL_INT

2018-10-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87691 Richard Biener changed: What|Removed |Added CC||rguenth at gcc dot gnu.org --- Comment

[Bug c/87691] transparent_union attribute does not work with MODE_PARTIAL_INT

2018-10-22 Thread jozef.l at mittosystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87691 --- Comment #5 from Jozef Lawrynowicz --- (In reply to Richard Biener from comment #4) Thanks for the pointers. > What happens if you make the attribute work for a MODE_INT union with a > MODE_PARTIAL_INT first field that has MODE_SIZE of the u

[Bug c/87691] transparent_union attribute does not work with MODE_PARTIAL_INT

2018-10-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87691 --- Comment #4 from Richard Biener --- What happens if you make the attribute work for a MODE_INT union with a MODE_PARTIAL_INT first field that has MODE_SIZE of the union mode? Is there a generic way to query SImode for PSImode as defined in P

[Bug c/87691] transparent_union attribute does not work with MODE_PARTIAL_INT

2018-10-22 Thread jozef.l at mittosystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87691 --- Comment #3 from Jozef Lawrynowicz --- Perhaps it is sufficient to check targetm.pass_by_reference, i.e. if the struct/union with the given mode would be passed by reference, then it is ok to give the struct/union a mode outside the MODE_INT c

[Bug c/87691] transparent_union attribute does not work with MODE_PARTIAL_INT

2018-10-22 Thread jozef.l at mittosystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87691 --- Comment #2 from Jozef Lawrynowicz --- Created attachment 44880 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44880&action=edit transparent_union.patch

[Bug c/87691] transparent_union attribute does not work with MODE_PARTIAL_INT

2018-10-22 Thread jozef.l at mittosystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87691 --- Comment #1 from Jozef Lawrynowicz --- The issue is that the union is considered to have size of 32 bits (the in-memory size of __int20), so unless mode_for_size as called by compute_record_mode (both in stor-layout.c) is explicitly told to lo