https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93235
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- aarch64 is one of the few targets that has a floating point type which is less than SImode :). A simple workaround for this bug is to change the code slightly: struct sfp16 { __fp16 f; }; struct sfp16 get(short x) { union { __fp16 f; short w; } u; u.w = x; return (struct sfp16){u.f}; }