i386: Fix C99 compatibility issues in the x86-64 AVX ABI test suite
Checks
Commit Message
* 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(-)
base-commit: d72492cca7a66af166b8dcf58d1166d8b0c59c59
Comments
On Wed, Nov 08, 2023 at 03:55:17PM +0100, Florian Weimer wrote:
> * 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.
LGTM.
Jakub
* Jakub Jelinek:
> On Wed, Nov 08, 2023 at 03:55:17PM +0100, Florian Weimer wrote:
>> * 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.
>
> LGTM.
I should have scrolled down further, there are more fixes required along
the same lines. Still okay?
Thanks,
Florian
On Thu, Nov 09, 2023 at 10:33:40AM +0100, Florian Weimer wrote:
> * Jakub Jelinek:
>
> > On Wed, Nov 08, 2023 at 03:55:17PM +0100, Florian Weimer wrote:
> >> * 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.
> >
> > LGTM.
>
> I should have scrolled down further, there are more fixes required along
> the same lines. Still okay?
Yes.
Jakub
@@ -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;
@@ -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. */
@@ -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;
@@ -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. */