https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96613
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gcc dot gnu.org --- Comment #3 from anlauf at gcc dot gnu.org --- Created attachment 49066 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49066&action=edit WIP patch The underlying issue is visible in the tree-dump, see also comment#1 by Steve. Changing the type and kind of the temporary to a common argument one instead of the result, the issue is fixed. Playing around a little bit, one finds that even the GNU extension to MIN/MAX, allowing different argument kinds, is fishy. The attached patch appears regtesting fine, but the coverage of the borderline cases is insufficient yet. I'm not sure I got the GIMPLE magic right everywhere, so the patch may need extended testing before submitting.