https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94665
--- Comment #14 from z.zhanghaijian at huawei dot com <z.zhanghaijian at huawei dot com> --- (In reply to Segher Boessenkool from comment #11) > Confirmed the comment 4 problem, on all archs. This is a very old bug. There are two ways to fix this bug: 1. Change flag_unsafe_math_optimizations to flag_finite_math_only, so that fmaxnm/fminnm can be generated under -ffinite-math-only; 2. Delete this optimization. Which one do you prefer?