https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118460

--- Comment #2 from Torbjorn SVENSSON <azoff at gcc dot gnu.org> ---
std::hypot() is actually expanded to a min/max like expression.
Anyhow, I've reduced it further down to the following C snippet:

$ cat pr118460.c
_Float16
bar(_Float16 x, _Float16 y)
{
  return x < y ? x : y;
}


$ arm-none-eabi-gcc pr118460.c -mthumb -march=armv8.1-m.main+fp
-mfloat-abi=hard -mfpu=auto -S -o /dev/null -O2
pr118460.c: In function 'bar':
pr118460.c:6:1: error: unrecognizable insn:
    5 | }
      | ^
(insn 10 9 11 2 (set (reg:HF 119)
        (if_then_else:HF (lt (reg:CCFPE 100 cc)
                (const_int 0 [0]))
            (reg/v:HF 116 [ x ])
            (reg/v:HF 117 [ y ]))) "pr118460.c":4:20 discrim 5 -1
     (nil))
during RTL pass: vregs
pr118460.c:5:1: internal compiler error: in extract_insn, at recog.cc:2791
0x7f95dfbbc082 __libc_start_main
        ../csu/libc-start.c:308
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

I don't know how you came to the 4.1.0 conclusion, but both this reduced C
snippet, and the previous C++ snippets builds fine in r14-2698-g6d449531a60.

Reply via email to