https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107533
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-05-19 Ever confirmed|0 |1 Severity|normal |enhancement Status|UNCONFIRMED |NEW --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Take: ``` struct phalf { __fp16 first; __fp16 second; }; void phalf_copy_(struct phalf *d, struct phalf src) { *d = src; } struct phalf phalf_copy0( __fp16 f, __fp16 s) { struct phalf t = {f, s}; return t; } struct phalf phalf_copy(struct phalf* src) { return *src; } struct phalf phalf_copy1(__fp16 *f, __fp16 *s) { struct phalf t = {*f, *s}; return t; } void phalf_copy2(struct phalf *d, __fp16 *f, __fp16 *s) { struct phalf t = {*f, *s}; *d = t; } void phalf_copy3(struct phalf *d, struct phalf* src) { *d = *src; } void phalf_copy4(struct phalf *d, __fp16 f, __fp16 s) { struct phalf t = {f, s}; *d = t; } ``` 2,3,4 are all ok, while 0, none, _ and 1 are bad. Which points to return values and argument passing being bad (which we already knew had issues). Confirmed.