https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114222
Bug ID: 114222 Summary: gcc.c-torture/execute/builtin-bitops-1.c fails for H8/300 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: jdx at o2 dot pl Target Milestone: --- Host: x86_64-pc-linux-gnu Target: h8300-elf Excerpt from gcc.log: [...] Executing on host: /home/jdx/testgcc/builddir/gcc/xgcc -B/home/jdx/testgcc/builddir/gcc/ /home/jdx/testgcc/combosrc/gcc/testsuite/gcc.c-torture/execute/builtin-bitops-1.c -fdiagnostics-plain-output -O0 -w -isystem /home/jdx/testgcc/builddir/h8300-elf/./newlib/targ-include -isystem /home/jdx/testgcc/combosrc/newlib/libc/include -L/home/jdx/testgcc/builddir/ld -B/home/jdx/testgcc/builddir/h8300-elf/./newlib/ -L/home/jdx/testgcc/builddir/h8300-elf/./newlib -lm -o ./builtin-bitops-1.exe (timeout = 300) spawn -ignore SIGHUP /home/jdx/testgcc/builddir/gcc/xgcc -B/home/jdx/testgcc/builddir/gcc/ /home/jdx/testgcc/combosrc/gcc/testsuite/gcc.c-torture/execute/builtin-bitops-1.c -fdiagnostics-plain-output -O0 -w -isystem /home/jdx/testgcc/builddir/h8300-elf/./newlib/targ-include -isystem /home/jdx/testgcc/combosrc/newlib/libc/include -L/home/jdx/testgcc/builddir/ld -B/home/jdx/testgcc/builddir/h8300-elf/./newlib/ -L/home/jdx/testgcc/builddir/h8300-elf/./newlib -lm -o ./builtin-bitops-1.exe PASS: gcc.c-torture/execute/builtin-bitops-1.c -O0 (test for excess errors) spawn /home/jdx/testgcc/builddir/sim/h8300/run ./builtin-bitops-1.exe program stopped with signal 4 (Illegal instruction). FAIL: gcc.c-torture/execute/builtin-bitops-1.c -O0 execution test [...] Further investigation showed that: a) the test case fails at line 181, (most likely) inside __builtin_ffs(); other __builtins work as expected, b) it happens when the test case is compiled with default options, i.e. when ints are 16 bit wide; when -mint32 is added to the options (i.e. ints are 32 bit wide), the test passes.