diff mbox series

Fix 201001011-1.c on H8

Message ID 9bd21e23-31e0-4217-bd5a-2976a1dca800@gmail.com
State New
Headers show
Series Fix 201001011-1.c on H8 | expand

Commit Message

Jeff Law March 4, 2024, 2:02 p.m. UTC
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
[ ... ]

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

gcc/testsuite
         * gcc.c-torture/execute/20101011-1.c: Do not test on H8 series.

Pushed on Jan's behalf.

Thanks,

Jeff
commit bd6e613c115c758f961999770acedc92d44d6950
Author: Jan Dubiec <jdx@o2.pl>
Date:   Mon Mar 4 06:59:07 2024 -0700

    Fix 201001011-1.c on H8
    
    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
    [ ... ]
    
    This is because H8 MCUs do not throw a "divide by zero" exception.
    
    gcc/testsuite
            * gcc.c-torture/execute/20101011-1.c: Do not test on H8 series.
diff mbox series

Patch

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