[gcc r14-6052] testsuite: Tweak some further tests for modern C changes

Jakub Jelinek jakub@gcc.gnu.org
Fri Dec 1 11:46:36 GMT 2023


https://gcc.gnu.org/g:9e6885467476da963e941986b14ffb57fee6bf50

commit r14-6052-g9e6885467476da963e941986b14ffb57fee6bf50
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Dec 1 12:45:58 2023 +0100

    testsuite: Tweak some further tests for modern C changes
    
    On IRC Richi mentioned some FAILs in gcc.target/x86_64 and in pr83126.c.
    
    The following patch fixes the former ones (they need recent binutils to
    be enabled), for pr83126.c because I didn't have graphite configured I've
    just verified that the test compiles (didn't without the patch) and that
    the gimple dump is identical with one from yesterday's gcc (as it was a
    tree-parloops.cc ICE, I guess identical gimple is all we care about
    and no need to verify it further).
    
    2023-12-01  Jakub Jelinek  <jakub@redhat.com>
    
            * gcc.target/x86_64/abi/avx512fp16/m512h/test_passing_m512.c
            (fun_check_passing_m512_8_values, fun_check_passing_m512h_8_values):
            Add missing void return type.
            * gcc.target/x86_64/abi/avx512fp16/m256h/test_passing_m256.c
            (fun_check_passing_m256_8_values, fun_check_passing_m256h_8_values):
            Likewise.
            * gcc.dg/graphite/pr83126.c (ew): Add missing casts to __INTPTR_TYPE__
            and then to int *.

Diff:
---
 gcc/testsuite/gcc.dg/graphite/pr83126.c                                 | 2 +-
 .../gcc.target/x86_64/abi/avx512fp16/m256h/test_passing_m256.c          | 2 ++
 .../gcc.target/x86_64/abi/avx512fp16/m512h/test_passing_m512.c          | 2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/graphite/pr83126.c b/gcc/testsuite/gcc.dg/graphite/pr83126.c
index 36bf5d5c4ef..a69dbd5fdcf 100644
--- a/gcc/testsuite/gcc.dg/graphite/pr83126.c
+++ b/gcc/testsuite/gcc.dg/graphite/pr83126.c
@@ -12,7 +12,7 @@ ew (unsigned short int c9, int stuff)
       int *fd = &stuff;
 
       *fd = c9;
-      fd = *fd;
+      fd = (int *) (__INTPTR_TYPE__) *fd;
       if (*fd != 0)
 	for (*by = 0; *by < 2; ++*by)
 	  c9 *= e1;
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m256h/test_passing_m256.c b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m256h/test_passing_m256.c
index bfa80d616ee..6138eeeea10 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m256h/test_passing_m256.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m256h/test_passing_m256.c
@@ -25,6 +25,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,
@@ -45,6 +46,7 @@ fun_check_passing_m256_8_values (__m256 i0 ATTRIBUTE_UNUSED,
   compare (values.i7, i7, __m256);
 }
 
+void
 fun_check_passing_m256h_8_values (__m256h i0 ATTRIBUTE_UNUSED,
 				  __m256h i1 ATTRIBUTE_UNUSED,
 				  __m256h i2 ATTRIBUTE_UNUSED,
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m512h/test_passing_m512.c b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m512h/test_passing_m512.c
index ad5ba2e7f92..7c5f03b572e 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m512h/test_passing_m512.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512fp16/m512h/test_passing_m512.c
@@ -25,6 +25,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,
@@ -45,6 +46,7 @@ fun_check_passing_m512_8_values (__m512 i0 ATTRIBUTE_UNUSED,
   compare (values.i7, i7, __m512);
 }
 
+void
 fun_check_passing_m512h_8_values (__m512h i0 ATTRIBUTE_UNUSED,
 				  __m512h i1 ATTRIBUTE_UNUSED,
 				  __m512h i2 ATTRIBUTE_UNUSED,


More information about the Gcc-cvs mailing list