public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [committed] Fix m68k testcase for c99
Date: Thu, 14 Dec 2023 06:33:24 -0700	[thread overview]
Message-ID: <f530c44f-450a-43b9-98ed-d390ebf5f3c8@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 272 bytes --]


More fallout from the c99 conversion.   The m68k specific test pr63347.c 
calls exit and abort without a prototype in scope.  This patch turns 
them into __builtin calls avoiding the error.

Bootstrapped and regression tested on m68k-linux-gnu, pushed to the trunk.

Jeff

[-- Attachment #2: P --]
[-- Type: text/plain, Size: 1165 bytes --]

commit 679adb2396a911b5999591f7a4f27a88064e91ff
Author: Jeff Law <jlaw@ventanamicro.com>
Date:   Thu Dec 14 06:31:49 2023 -0700

    [committed] Fix m68k testcase for c99
    
    More fallout from the c99 conversion.   The m68k specific test pr63347.c calls
    exit and abort without a prototype in scope.  This patch turns them into
    __builtin calls avoiding the error.
    
    Bootstrapped and regression tested on m68k-linux-gnu, pushed to the trunk.
    
    gcc/testsuite
            * gcc.target/m68k/pr63347.c: Call __builtin_abort and __builtin_exit
            instead of abort and exit.

diff --git a/gcc/testsuite/gcc.target/m68k/pr63347.c b/gcc/testsuite/gcc.target/m68k/pr63347.c
index 63964769766..b817f4694f3 100644
--- a/gcc/testsuite/gcc.target/m68k/pr63347.c
+++ b/gcc/testsuite/gcc.target/m68k/pr63347.c
@@ -32,13 +32,13 @@ int main(int argc, char *argv[])
     myaddr = 0x0;
     ret = print_info(&myaddr);
     if (!ret)
-        abort ();
+        __builtin_abort ();
 
     myaddr = 0x01020304;
     ret = print_info(&myaddr);
     if (ret)
-        abort ();
-    exit (0);
+        __builtin_abort ();
+    __builtin_exit (0);
 }
 
 

                 reply	other threads:[~2023-12-14 13:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f530c44f-450a-43b9-98ed-d390ebf5f3c8@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).