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

            Bug ID: 118460
           Summary: [14/15 Regression] ICE on armv8.1-m.main with
                    -mfloat-abi=hard
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: azoff at gcc dot gnu.org
  Target Milestone: ---

Starting in r14-2699-g9f8f37f5490, the following snippet (extracted from
libstdc++-v3/testsuite/26_numerics/headers/cmath/functions_std_c++23.cc) ICEs
on Cortex-M55/85 with -mfloat-abi=hard.

#include <stdfloat>
#include <cmath>

void
test_functions(std::float16_t *p)
{
  p[0] = std::hypot(p[0], p[1], p[2]);
}

int
main()
{
  std::float16_t p[10] = {};
  test_functions(p);
}



Example command to reproduce:

arm-none-eabi-g++ foo.cc -mthumb -march=armv8.1-m.main+fp -mfloat-abi=hard
-mfpu=auto -std=gnu++23 -S -o /dev/null -O2
foo.cc: In function 'void test_functions(std::float16_t*, int*, long int*, long
long int*)':
foo.cc:27:1: error: unrecognizable insn:
   27 | }
      | ^
(insn 24 23 25 6 (set (reg:HF 136)
        (if_then_else:HF (lt (reg:CCFPE 100 cc)
                (const_int 0 [0]))
            (reg:HF 119 [ _11 ])
            (reg:HF 118 [ _10 ]))) -1
     (nil))
during RTL pass: vregs
foo.cc:27:1: internal compiler error: in extract_insn, at recog.cc:2791
0x7fd7a39e4082 __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.

Reply via email to