在 2023-07-14 21:38, sisyphus 写道:
Hi,
I've tested this with 64-bit gcc-11.3.0 and (both 32-bit and 64-bit)
gcc-13.1.0 nad am seeing the same brokenness.


Looks like our `fpclassify()` doesn't handle `__float128`:

```
#define fpclassify(x) \
__mingw_choose_expr (                                         \
  __mingw_types_compatible_p (__typeof__ (x), double),            \
    __fpclassify(x),                                            \
    __mingw_choose_expr (                                     \
      __mingw_types_compatible_p (__typeof__ (x), float),         \
        __fpclassifyf(x),                                       \
    __mingw_choose_expr (                                     \
      __mingw_types_compatible_p (__typeof__ (x), long double),   \
        __fpclassifyl(x),                                       \
    __dfp_expansion(__fpclassify,(__builtin_trap(),0),x))))
```

Here `__float128` matches none of the above and leads to `__builtin_trap()`:

```
# gcc isfinite.c -S -o -
main:
        push    rbp
        .seh_pushreg    rbp
        mov     rbp, rsp
        .seh_setframe   rbp, 0
        sub     rsp, 48
        .seh_stackalloc 48
        .seh_endprologue
        call    __main
        movdqu  xmm0, XMMWORD PTR .LC0[rip]
        movups  XMMWORD PTR -16[rbp], xmm0
        ud2       <-------------------------- __builtin_trap()
        .seh_endproc
        .section .rdata,"dr"
        .align 16
```


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to