You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wasm2c/spec/float_exprs.txt test fails with GCC 15 on ppc64le and s390x #2542
It does not AFAICT, but often there is more code required "surrounding" the minimal code snippets, so the compiler makes different decisions. I believe I should be able to reduce my example above to have something useful for the toolchains team.
and compiled with gcc -std=c99 -O2 -Wall -fno-optimize-sibling-calls -frounding-math -fsignaling-nans -D_DEFAULT_SOURCE -o test test.c reproduces the issue with GCC 15, but runs OK with GCC 14
changed the title [-]wasm2c/spec/float_exprs.txt test fails with GCC 15 on ppc64le[/-][+]wasm2c/spec/float_exprs.txt test fails with GCC 15 on ppc64le and s390x[/+]on Feb 21, 2025
Activity
SoniEx2 commentedon Feb 17, 2025
at first glance, this looks like a GCC bug.
rathann commentedon Feb 18, 2025
Ok, gcc bug opened: https://bugzilla.redhat.com/show_bug.cgi?id=2346233 . Could you help prepare a minimum piece of code to reproduce the issue and help gcc maintainers fix it?
sharkcz commentedon Feb 18, 2025
test/wasm2c/spec/float_exprs.txt points to https://github.com/WebAssembly/testsuite/blob/eeb6dac81be81151da0958ed955aba91230c1f25/float_exprs.wast#L2269 for the offending code, but how this is translated to a C code that GCC consumes is magic to me :-) Although maybe I am getting somewhere ...
sharkcz commentedon Feb 18, 2025
with reduced
float_exprs.wastinstalled asout/test/wasm2c/spec/float_exprs.wastone can doSoniEx2 commentedon Feb 18, 2025
does this exhibit the problem?
(compile with same flags and whatnot ofc, feel free to rename the function the name clearly doesn't matter)
sharkcz commentedon Feb 18, 2025
It does not AFAICT, but often there is more code required "surrounding" the minimal code snippets, so the compiler makes different decisions. I believe I should be able to reduce my example above to have something useful for the toolchains team.
SoniEx2 commentedon Feb 18, 2025
we assume you did check the exit status? it doesn't output anything other than the exit status, but that might have been unclear, sorry.
sharkcz commentedon Feb 18, 2025
sorry, I haven't read the code :-) Is return code
1a reproducer or not?SoniEx2 commentedon Feb 18, 2025
indeed, it's supposed to return 0.
SoniEx2 commentedon Feb 18, 2025
it can be minimized further, but you can probably do that a lot easier now.
sharkcz commentedon Feb 18, 2025
and compiled with
gcc -std=c99 -O2 -Wall -fno-optimize-sibling-calls -frounding-math -fsignaling-nans -D_DEFAULT_SOURCE -o test test.creproduces the issue with GCC 15, but runs OK with GCC 14rathann commentedon Feb 18, 2025
@SoniEx2 your assistance is much appreciated! Could you take a look at other failed test issues I opened?
rathann commentedon Feb 21, 2025
I am getting this on s390x, too.
[-]wasm2c/spec/float_exprs.txt test fails with GCC 15 on ppc64le[/-][+]wasm2c/spec/float_exprs.txt test fails with GCC 15 on ppc64le and s390x[/+]SoniEx2 commentedon Feb 21, 2025
btw, does
return (var_p0 < var_p1) | (var_p0 >= var_p1);exhibit the problem?sharkcz commentedon Feb 21, 2025
it does
And I am confirming the s390x failure.
SoniEx2 commentedon Feb 21, 2025
GCC, that's not how floats work 🤦🏻♀️
thanks for confirming!
rathann commentedon Nov 17, 2025
This is fixed in GCC and tests pass now.