Description of problem: Starting with gcc-15.0.1-0.3.fc42, the wabt testsuite (1.0.33-1.0.36) is failing on the wasm2c/spec/float_exprs.txt test on ppc64le only. Version-Release number of selected component (if applicable): gcc-15.0.1-0.7.fc43.ppc64le How reproducible: Always Steps to Reproduce: 1. fedpkg clone rpms/wabt 2. koji build --scratch --arch=ppc64le rawhide "git+https://src.fedoraproject.org/rpms/wabt.git#9fb6f15d26dcb42284bb5778c468afbb6571b0fa" Actual results: ... - test/wasm2c/spec/float_exprs.txt expected error code 0, got 1. STDERR MISMATCH: --- expected +++ actual @@ -0,0 +1,8 @@ +float_exprs.wast:2238: assertion failed: in w2c_float__exprs__86__wasm_f320x2Eno_trichotomy_lt(&float__exprs__86__wasm_instance, 0.f, make_nan_f32(0x400000)): expected 0, got 1. +float_exprs.wast:2239: assertion failed: in w2c_float__exprs__86__wasm_f320x2Eno_trichotomy_le(&float__exprs__86__wasm_instance, 0.f, make_nan_f32(0x400000)): expected 0, got 1. +float_exprs.wast:2240: assertion failed: in w2c_float__exprs__86__wasm_f320x2Eno_trichotomy_gt(&float__exprs__86__wasm_instance, 0.f, make_nan_f32(0x400000)): expected 0, got 1. +float_exprs.wast:2241: assertion failed: in w2c_float__exprs__86__wasm_f320x2Eno_trichotomy_ge(&float__exprs__86__wasm_instance, 0.f, make_nan_f32(0x400000)): expected 0, got 1. +float_exprs.wast:2242: assertion failed: in w2c_float__exprs__86__wasm_f640x2Eno_trichotomy_lt(&float__exprs__86__wasm_instance, 0.0000000000000000, make_nan_f64(0x8000000000000)): expected 0, got 1. +float_exprs.wast:2243: assertion failed: in w2c_float__exprs__86__wasm_f640x2Eno_trichotomy_le(&float__exprs__86__wasm_instance, 0.0000000000000000, make_nan_f64(0x8000000000000)): expected 0, got 1. +float_exprs.wast:2244: assertion failed: in w2c_float__exprs__86__wasm_f640x2Eno_trichotomy_gt(&float__exprs__86__wasm_instance, 0.0000000000000000, make_nan_f64(0x8000000000000)): expected 0, got 1. +float_exprs.wast:2245: assertion failed: in w2c_float__exprs__86__wasm_f640x2Eno_trichotomy_ge(&float__exprs__86__wasm_instance, 0.0000000000000000, make_nan_f64(0x8000000000000)): expected 0, got 1. STDOUT MISMATCH: --- expected +++ actual @@ -1 +1 @@ -794/794 tests passed. +786/794 tests passed. ... Expected results: + test/wasm2c/spec/float_exprs.txt Additional info: Upstream says it's a GCC bug.
- with test/run-tests.py -v -p --bindir redhat-linux-build --timeout=1200 -j8 test/wasm2c/spec/float_exprs.txt one can run just the single test case - fails with gcc-15.0.0-0.4.fc42 as well, so it's likely a gcc 15 related issue, not a recent change
seems I am getting somewhere in the test case minimization, stay tuned ...
manually minimized reproducer provided by upstream #include <string.h> #include <stdint.h> typedef uint32_t u32; typedef float f32; __attribute__((noinline)) u32 w2c_float__exprs__88__wasm_f320x2Eno_trichotomy_lt_0(void* instance, f32 var_p0, f32 var_p1) { u32 var_i0, var_i1; f32 var_f0, var_f1, var_f2; var_f0 = var_p0; var_f1 = var_p1; var_i0 = var_f0 < var_f1; var_f1 = var_p0; var_f2 = var_p1; var_i1 = var_f1 >= var_f2; var_i0 |= var_i1; return var_i0; } static f32 make_nan_f32(u32 x) { x |= 0x7f800000; f32 res; memcpy(&res, &x, sizeof(res)); return res; } int main(int argc, char **argv) { return w2c_float__exprs__88__wasm_f320x2Eno_trichotomy_lt_0(NULL, 0.f, make_nan_f32(0x400000)); } 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 (return code 1), but runs OK with GCC 14 (return code 0)
no compiler options except (at least) -O1 are required
Created attachment 2076985 [details] preprocessed source
same issue exists on s390x too
FEDORA-2025-6a12d86df4 (gcc-15.0.1-0.9.fc42) has been submitted as an update to Fedora 42. https://bodhi.fedoraproject.org/updates/FEDORA-2025-6a12d86df4
FEDORA-2025-6a12d86df4 has been pushed to the Fedora 42 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-6a12d86df4` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-6a12d86df4 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2025-6a12d86df4 (gcc-15.0.1-0.9.fc42) has been pushed to the Fedora 42 stable repository. If problem still persists, please make note of it in this bug report.