public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Florian Weimer <fw@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-4620] C99 test suite readiness: Some unverified test case adjustments
Date: Fri, 13 Oct 2023 07:37:51 +0000 (GMT)	[thread overview]
Message-ID: <20231013073751.F39743857725@sourceware.org> (raw)

https://gcc.gnu.org/g:0fef2c89d165adca4c4aafeb8d822b4d6ac8623b

commit r14-4620-g0fef2c89d165adca4c4aafeb8d822b4d6ac8623b
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Oct 13 09:34:37 2023 +0200

    C99 test suite readiness: Some unverified test case adjustments
    
    These changes are assumed not to interfere with the test objective,
    but it was not possible to reproduce the historic test case failures
    (with or without the modification here).
    
    gcc/testsuite/
    
            * gcc.c-torture/compile/20000105-1.c: Add missing int return type.
            Call __builtin_exit instead of exit.
            * gcc.c-torture/compile/20000105-2.c: Add missing void types.
            * gcc.c-torture/compile/20000211-1.c (Lstream_fputc, Lstream_write)
            (Lstream_flush_out, parse_doprnt_spec): Add missing function
            declaration.
            * gcc.c-torture/compile/20000224-1.c (call_critical_lisp_code):
            Declare.
            * gcc.c-torture/compile/20000314-2.c: Add missing void types.
            * gcc.c-torture/compile/980816-1.c (XtVaCreateManagedWidget)
            (XtAddCallback): Likewise.
            * gcc.c-torture/compile/pr49474.c: Use struct
            gfc_formal_arglist * instead of (implied) int type.
            * gcc.c-torture/execute/20001111-1.c (foo): Add cast to
            char *.
            (main): Call __builtin_abort and __builtin_exit.

Diff:
---
 gcc/testsuite/gcc.c-torture/compile/20000105-1.c | 5 +++--
 gcc/testsuite/gcc.c-torture/compile/20000105-2.c | 3 ++-
 gcc/testsuite/gcc.c-torture/compile/20000211-1.c | 4 ++++
 gcc/testsuite/gcc.c-torture/compile/20000224-1.c | 1 +
 gcc/testsuite/gcc.c-torture/compile/20000314-2.c | 3 ++-
 gcc/testsuite/gcc.c-torture/compile/980816-1.c   | 2 ++
 gcc/testsuite/gcc.c-torture/compile/pr49474.c    | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20001111-1.c | 8 ++++----
 8 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/gcc/testsuite/gcc.c-torture/compile/20000105-1.c b/gcc/testsuite/gcc.c-torture/compile/20000105-1.c
index 6f389d88b22..1917b2b6656 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20000105-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20000105-1.c
@@ -1,14 +1,15 @@
+int
 main(int na, char* argv[])
 {
 	int wflg = 0, tflg = 0;
 	int dflg = 0;
-	exit(0);
+	__builtin_exit(0);
 	while(1)
 	{
 		switch(argv[1][0])
 		{
 			help:
-				exit(0);
+				__builtin_exit(0);
 			case 'w':
 			case 'W':
 				wflg = 1;
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000105-2.c b/gcc/testsuite/gcc.c-torture/compile/20000105-2.c
index 7689395f45d..74bee07144a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20000105-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20000105-2.c
@@ -1,4 +1,5 @@
-foo ()
+void
+foo (void)
 {
   long long int i = (int) "";
 }
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000211-1.c b/gcc/testsuite/gcc.c-torture/compile/20000211-1.c
index b83d6a40520..c6b6c245dc9 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20000211-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20000211-1.c
@@ -46,6 +46,10 @@ typedef struct
 typedef struct
 {
 } printf_arg_dynarr;
+extern void Lstream_fputc (struct lstream *, int);
+extern void Lstream_write (struct lstream *, const Bufbyte *, Bytecount);
+extern void Lstream_flush_out (struct lstream *);
+extern printf_spec_dynarr *parse_doprnt_spec (Bufbyte *, Bytecount);
 static void
 doprnt_1 (Lisp_Object stream, const  Bufbyte *string, Bytecount len,
 	  Charcount minlen, Charcount maxlen, int minus_flag, int zero_flag)
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000224-1.c b/gcc/testsuite/gcc.c-torture/compile/20000224-1.c
index 1c72b6accab..085c33fd206 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20000224-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20000224-1.c
@@ -21,6 +21,7 @@ union Lisp_Object
   }
 Lisp_Object;
 extern int initialized;
+extern void call_critical_lisp_code (Lisp_Object);
 void
 init_device_faces (int *d)
 {
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000314-2.c b/gcc/testsuite/gcc.c-torture/compile/20000314-2.c
index 3fdb3c3a857..0ec8181e6df 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20000314-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20000314-2.c
@@ -1,6 +1,7 @@
 extern void malloc(__SIZE_TYPE__ size); 
 
-toto()
+void
+toto(void)
 {
     malloc(100);
 }
diff --git a/gcc/testsuite/gcc.c-torture/compile/980816-1.c b/gcc/testsuite/gcc.c-torture/compile/980816-1.c
index 5bd83b17063..ae942147c4b 100644
--- a/gcc/testsuite/gcc.c-torture/compile/980816-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/980816-1.c
@@ -16,6 +16,8 @@ typedef void (*XtCallbackProc)(
 
 extern const  char XtStrings[];
 
+extern Widget XtVaCreateManagedWidget(const char *, WidgetClass, Widget, ...);
+extern void XtAddCallback(const char *, XtCallbackProc, XtPointer);
 
 typedef struct						 
 {
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr49474.c b/gcc/testsuite/gcc.c-torture/compile/pr49474.c
index 0368ccb02fa..01fe0b113e7 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr49474.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr49474.c
@@ -1,8 +1,9 @@
 typedef struct gfc_formal_arglist
 {
-  int next;
+  struct gfc_formal_arglist* next;
 }
 gfc_actual_arglist;
+struct gfc_formal_arglist*
 update_arglist_pass (gfc_actual_arglist* lst, int po, unsigned argpos,
        const char *name)
 {
diff --git a/gcc/testsuite/gcc.c-torture/execute/20001111-1.c b/gcc/testsuite/gcc.c-torture/execute/20001111-1.c
index 85617c23d44..30c8558efba 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20001111-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20001111-1.c
@@ -16,7 +16,7 @@ foo (unsigned int offset)
     return i * 0xce2f;
 
   buffer = next_buffer;
-  data = buffer * 0xce2f;
+  data = (char *) (buffer * 0xce2f);
   for (i = 0; i < 2; i++)
     bar ();
   buffer = next_buffer;
@@ -33,9 +33,9 @@ int
 main ()
 {
   if (foo (3) != 3)
-    abort ();
+    __builtin_abort ();
   next_buffer = 1;
   if (foo (2) != 0xce2f + 2)
-    abort ();
-  exit (0);
+    __builtin_abort ();
+  __builtin_exit (0);
 }

                 reply	other threads:[~2023-10-13  7:37 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=20231013073751.F39743857725@sourceware.org \
    --to=fw@gcc.gnu.org \
    --cc=gcc-cvs@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).