[Bug target/110796] builtin_iseqsig fails some tests in armv8l-linux-gnueabihf

thiago.bauermann at linaro dot org gcc-bugzilla@gcc.gnu.org
Tue Jul 25 17:14:03 GMT 2023


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

--- Comment #7 from Thiago Jung Bauermann <thiago.bauermann at linaro dot org> ---
(In reply to Francois-Xavier Coudert from comment #5)
> OK, so it signals FE_INVALID on the first test. Can you run this with the
> same options, and see what happens?

It ran normally:

thiago.bauermann@tcwg-jade-03-dev:~/tmp$ cat test-1.c
#include <fenv.h>
#include <stdio.h>

void
ftrue (float x, float y)
{
    if (!__builtin_iseqsig (x, y))
        __builtin_abort ();
}

int
main ()
{
    volatile float f1, f2;

    f1 = 0.f; f2 = 0.f;
    if (fetestexcept (FE_INVALID)) printf("Invalid 1\n");
    ftrue (f1, f2);
    if (fetestexcept (FE_INVALID)) printf("Invalid 2\n");

    return 0;
}
thiago.bauermann@tcwg-jade-03-dev:~/tmp$
/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/gcc/xgcc
-B/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/gcc/ test-1.c 
-fdiagnostics-plain-output    -Os  -fsignaling-nans -ggdb3  -lm  -o ./test-1
thiago.bauermann@tcwg-jade-03-dev:~/tmp$ ./test-1
thiago.bauermann@tcwg-jade-03-dev:~/tmp$ echo $?
0
thiago.bauermann@tcwg-jade-03-dev:~/tmp$

> One surprising thing is that the directive "dg-add-options ieee" in the test
> did not apparently add any other option for IEEE conformance…

Ah, that's an interesting thread to pull. I'll investigate if there's any
option we should be adding.


More information about the Gcc-bugs mailing list