public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/114221] New: gcc.c-torture/execute/20101011-1.c fails for H8/300
@ 2024-03-03 17:38 jdx at o2 dot pl
  2024-03-04 14:03 ` [Bug testsuite/114221] " law at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: jdx at o2 dot pl @ 2024-03-03 17:38 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114221
           Summary: gcc.c-torture/execute/20101011-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.sum:
[...]
PASS: gcc.c-torture/execute/20101011-1.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/execute/20101011-1.c   -O0  execution test
PASS: gcc.c-torture/execute/20101011-1.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/execute/20101011-1.c   -O1  execution test
PASS: gcc.c-torture/execute/20101011-1.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/execute/20101011-1.c   -O2  execution test
PASS: gcc.c-torture/execute/20101011-1.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/execute/20101011-1.c   -O3 -g  execution test
PASS: gcc.c-torture/execute/20101011-1.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/execute/20101011-1.c   -Os  execution test
PASS: gcc.c-torture/execute/20101011-1.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/execute/20101011-1.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none  execution test
PASS: gcc.c-torture/execute/20101011-1.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/execute/20101011-1.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  execution test
[...]

Excerpt from gcc.log:
[...]
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/20101011-1.c
-fdiagnostics-plain-output -O0 -fnon-call-exceptions -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 ./20101011-1.exe
PASS: gcc.c-torture/execute/20101011-1.c   -O0  (test for excess errors)
spawn /home/jdx/testgcc/builddir/sim/h8300/run ./20101011-1.exe
program stopped with signal 5 (Trace/breakpoint trap).
FAIL: gcc.c-torture/execute/20101011-1.c   -O0  execution test
[...]

This is because H8 MCUs do not throw a "divide by zero" exception.

Proposed solution:
diff --git a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
index d2c0f9ab7ec..9fa10309612 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
@@ -26,6 +26,9 @@
 #elif defined (__RX__)
   /* On RX division by zero does not trap.  */
 # define DO_TEST 0
+#elif defined (__H8300H__) || defined (__H8300S__) || defined (__H8300SX__)
+  /* On H8/300H, H8S and H8SX division by zero does not trap.  */
+# define DO_TEST 0
 #elif defined (__aarch64__)
   /* On AArch64 integer division by zero does not trap.  */
 # define DO_TEST 0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug testsuite/114221] gcc.c-torture/execute/20101011-1.c fails for H8/300
  2024-03-03 17:38 [Bug testsuite/114221] New: gcc.c-torture/execute/20101011-1.c fails for H8/300 jdx at o2 dot pl
@ 2024-03-04 14:03 ` law at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: law at gcc dot gnu.org @ 2024-03-04 14:03 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Fixed on the trunk.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-04 14:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-03 17:38 [Bug testsuite/114221] New: gcc.c-torture/execute/20101011-1.c fails for H8/300 jdx at o2 dot pl
2024-03-04 14:03 ` [Bug testsuite/114221] " law at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).