#287
Operations on signalling NaNs don't set floating-point exception bit in the musl port
Operations on signalling NaNs, unlike on plain NaNs, should set <fenv.h> floating-point exception bits. In Fil-C, they don't.
Version: filc-0.681-linux-x86_64
How to reproduce: Compile and run this program.
$ gcc -Wall foo.c -lm
$ ./a.out$ .../filc-0.681-linux-x86_64/build/bin/filcc -g -Wall foo.c
$ ./a.out
foo.c:459: assertion 'fetestexcept (FE_INVALID)' failed
filc user error: abort() called
(libpizlo.so) <runtime>: zerror
(libc.so) src/exit/abort.c:13:9: abort
(a.out) foo.c:459:5: main
(libc.so) src/env/__libc_start_main.c:79:7: __libc_start_main
(libpizlo.so) <runtime>: start_program
[2860413] filc panic: user thwarted themselves.
Trace/breakpoint trap (core dumped) ./a.out
Your test passes just fine with the glibc build of Fil-C (like the /opt/fil distro):
I confirmed that it fails with the musl distro:
The issue is that my musl port is currently wired up in such a way that all fexyz functions are no-ops. I should definitely fix that for fetestexcept, since I can't imagine that one being unsafe.