[Bug target/92287] Mismatches in the calling convention for zero sized types

2019-10-30 Thread jozefl.gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92287 Jozef Lawrynowicz changed: What|Removed |Added CC||jozefl.gcc at gmail dot com --- Comm

[Bug target/92287] Mismatches in the calling convention for zero sized types

2019-10-30 Thread gonzalobg88 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92287 --- Comment #2 from gnzlbg --- > I can only speak for msp430, but there's no problem with that generated > assembly. Structures and unions are always passed by reference. I suppose that by this you mean that the current behavior is "by design",

[Bug target/92287] Mismatches in the calling convention for zero sized types

2019-10-30 Thread jozefl.gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92287 --- Comment #3 from Jozef Lawrynowicz --- (In reply to gnzlbg from comment #2) > > I can only speak for msp430, but there's no problem with that generated > > assembly. Structures and unions are always passed by reference. > > I suppose that by

[Bug target/92287] Mismatches in the calling convention for zero sized types

2019-10-30 Thread gonzalobg88 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92287 --- Comment #4 from gnzlbg --- Thanks for chiming in. I see the value in having a simple ABI rule. I guess what confuses me is that the address passed in the calling convention for that struct will never be used for anything or dereferenced.

[Bug target/92287] Mismatches in the calling convention for zero sized types

2019-10-30 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92287 --- Comment #5 from Bill Schmidt --- For 32-bit big-endian PowerPC (using the 32-bit ELF ABI), the same code generation is provided by GCC and Clang. I.e., here's the code generation for Clang with -O2 -m32 -mbig-endian, using 6.0.0-1ubuntu2: i

[Bug target/92287] Mismatches in the calling convention for zero sized types

2019-10-30 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92287 Segher Boessenkool changed: What|Removed |Added CC||segher at gcc dot gnu.org --- Comme

[Bug target/92287] Mismatches in the calling convention for zero sized types

2019-10-31 Thread gonzalobg88 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92287 gnzlbg changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug target/92287] Mismatches in the calling convention for zero sized types

2019-10-31 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92287 --- Comment #8 from Segher Boessenkool --- (In reply to gnzlbg from comment #7) > > Note that the situation for zero-sized structs isn't very clear in > > most ABIs, these included. > > This is incorrect: zero-sized types are well-defined and ef

[Bug target/92287] Mismatches in the calling convention for zero sized types

2019-10-31 Thread gonzalobg88 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92287 --- Comment #9 from gnzlbg --- > sparc is another, for example. And or1k, too. Yeah, I was wrong. x86/x64, arm32/64, aarch64, riscv, ppc64, mips64, ... are some of the ABIs that do not have any of these issues because they special case "all agg

[Bug target/92287] Mismatches in the calling convention for zero sized types

2019-11-01 Thread jozefl.gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92287 --- Comment #10 from Jozef Lawrynowicz --- (In reply to gnzlbg from comment #9) > > @josef > > > The MSP430 ABI is here: http://www.ti.com/lit/an/slaa534/slaa534.pdf > Although confusingly that document is wrong regarding passing structures and