public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] i386: Fix C99 compatibility issues in the x86-64 AVX ABI test suite
Date: Wed, 08 Nov 2023 15:55:17 +0100	[thread overview]
Message-ID: <875y2c8fca.fsf@oldenburg.str.redhat.com> (raw)

	* gcc.target/x86_64/abi/avx/avx-check.h (main): Call
	__builtin_printf instead of printf.
	* gcc.target/x86_64/abi/avx/test_passing_m256.c
	(fun_check_passing_m256_8_values): Add missing void return
	type.
	* gcc.target/x86_64/abi/avx512f/avx512f-check.h (main): Call
	__builtin_printf instead of printf.
	* gcc.target/x86_64/abi/avx512f/test_passing_m512.c
	(fun_check_passing_m512_8_values): Add missing void return
	type.

---
 gcc/testsuite/gcc.target/x86_64/abi/avx/avx-check.h             | 4 ++--
 gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_m256.c     | 1 +
 gcc/testsuite/gcc.target/x86_64/abi/avx512f/avx512f-check.h     | 6 +++---
 gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_m512.c | 1 +
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx/avx-check.h b/gcc/testsuite/gcc.target/x86_64/abi/avx/avx-check.h
index e66a27e9afd..a04d0777637 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/avx/avx-check.h
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx/avx-check.h
@@ -16,12 +16,12 @@ main ()
     {
       avx_test ();
 #ifdef DEBUG
-      printf ("PASSED\n");
+      __builtin_printf ("PASSED\n");
 #endif
     }
 #ifdef DEBUG
   else
-    printf ("SKIPPED\n");
+    __builtin_printf ("SKIPPED\n");
 #endif
 
   return 0;
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_m256.c b/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_m256.c
index ffc3ec36bf7..f739670431b 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_m256.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_m256.c
@@ -24,6 +24,7 @@ int failed = 0;
   assert (memcmp (&X1, &X2, sizeof (T)) == 0); \
 } while (0)
 
+void
 fun_check_passing_m256_8_values (__m256 i0 ATTRIBUTE_UNUSED, __m256 i1 ATTRIBUTE_UNUSED, __m256 i2 ATTRIBUTE_UNUSED, __m256 i3 ATTRIBUTE_UNUSED, __m256 i4 ATTRIBUTE_UNUSED, __m256 i5 ATTRIBUTE_UNUSED, __m256 i6 ATTRIBUTE_UNUSED, __m256 i7 ATTRIBUTE_UNUSED)
 {
   /* Check argument values.  */
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/avx512f-check.h b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/avx512f-check.h
index 25ce544c4a3..00a7578d2b5 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/avx512f-check.h
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/avx512f-check.h
@@ -24,17 +24,17 @@ main ()
 	{
 	  avx512f_test ();
 #ifdef DEBUG
-	  printf ("PASSED\n");
+	  __builtin_printf ("PASSED\n");
 #endif
 	}
 #ifdef DEBUG
       else
-	printf ("SKIPPED\n");
+	__builtin_printf ("SKIPPED\n");
 #endif
     }
 #ifdef DEBUG
   else
-    printf ("SKIPPED\n");
+    __builtin_printf ("SKIPPED\n");
 #endif
 
   return 0;
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_m512.c b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_m512.c
index ead9c6797e1..1c88a55fb4b 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_m512.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_m512.c
@@ -24,6 +24,7 @@ int failed = 0;
   assert (memcmp (&X1, &X2, sizeof (T)) == 0); \
 } while (0)
 
+void
 fun_check_passing_m512_8_values (__m512 i0 ATTRIBUTE_UNUSED, __m512 i1 ATTRIBUTE_UNUSED, __m512 i2 ATTRIBUTE_UNUSED, __m512 i3 ATTRIBUTE_UNUSED, __m512 i4 ATTRIBUTE_UNUSED, __m512 i5 ATTRIBUTE_UNUSED, __m512 i6 ATTRIBUTE_UNUSED, __m512 i7 ATTRIBUTE_UNUSED)
 {
   /* Check argument values.  */

base-commit: d72492cca7a66af166b8dcf58d1166d8b0c59c59


             reply	other threads:[~2023-11-08 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-08 14:55 Florian Weimer [this message]
2023-11-08 14:58 ` Jakub Jelinek
2023-11-09  9:33   ` Florian Weimer
2023-11-09  9:36     ` Jakub Jelinek

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=875y2c8fca.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.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).