[Bug target/116063] [PPC] Transparent union issue with signedness when optimizing

2024-07-24 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116063 --- Comment #4 from Segher Boessenkool --- The two members have the same in-memory representation, but transparent_union is explicitly only about function arguments, so Andrew's arguments are very valid I think. It would be nice if we could war

[Bug target/116063] [PPC] Transparent union issue with signedness when optimizing

2024-07-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116063 --- Comment #3 from Andrew Pinski --- (In reply to Hubert Tong from comment #2) > If it is invalid, a diagnostic like this should appear: > ``` > warning: union cannot be made transparent > ``` Not always. typedef union __attribute__((__transpa

[Bug target/116063] [PPC] Transparent union issue with signedness when optimizing

2024-07-23 Thread hstong at ca dot ibm.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116063 --- Comment #2 from Hubert Tong --- If it is invalid, a diagnostic like this should appear: ``` warning: union cannot be made transparent ```

[Bug target/116063] [PPC] Transparent union issue with signedness when optimizing

2024-07-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116063 --- Comment #1 from Andrew Pinski --- Hmm (https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Common-Type-Attributes.html): Second, the argument is passed to the function using the calling conventions of the first member of the transparent union, not