public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite/arm: Fix bfloat16_vector_typecheck_[12].c tests
@ 2023-11-30 10:15 Christophe Lyon
  2023-11-30 11:45 ` Richard Earnshaw
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe Lyon @ 2023-11-30 10:15 UTC (permalink / raw)
  To: gcc-patches, richard.sandiford, richard.earnshaw, kyrylo.tkachov
  Cc: Christophe Lyon

After commit r14-5617-gb8592186611, int32x[24]_t types now use
elements of 'long int' type instead of 'int' on arm-eabi (it's still
'int' on arm-linux-gnueabihf).  Both are 32-bit types anyway.

This patch adjust the two tests so that they optionnally accept 'long '
before 'int' in the expected error message.

2023-11-30  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/testsuite/
	* gcc.target/arm/bfloat16_vector_typecheck_1.c: Update expected
	error message.
	* gcc.target/arm/bfloat16_vector_typecheck_2.c: Likewise.
---
 gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_1.c | 4 ++--
 gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_2.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_1.c b/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_1.c
index f3c350b4cfc..470c13125fb 100644
--- a/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_1.c
+++ b/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_1.c
@@ -119,9 +119,9 @@ bfloat16x4_t footest (bfloat16x4_t vector0)
   (bfloat16x4_t) { is_a_short_vec }; /* { dg-error {incompatible types when initializing type '__bf16' using type 'int16x4_t'} } */
 
   (bfloat16x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type '__bf16' using type 'bfloat16x4_t'} } */
-  (int32x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type 'int' using type 'bfloat16x4_t'} } */
+  (int32x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type '(?:long )?int' using type 'bfloat16x4_t'} } */
   (float32x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type 'float' using type 'bfloat16x4_t'} } */
-  (int32x2_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type 'int' using type 'bfloat16x4_t'} } */
+  (int32x2_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type '(?:long )?int' using type 'bfloat16x4_t'} } */
   (float16x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type '__fp16' using type 'bfloat16x4_t'} } */
   (int16x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type 'short int' using type 'bfloat16x4_t'} } */
 
diff --git a/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_2.c b/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_2.c
index de0ade52c10..4e0d37907ce 100644
--- a/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_2.c
+++ b/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_2.c
@@ -111,7 +111,7 @@ bfloat16x8_t footest (bfloat16x8_t vector0)
   (bfloat16x8_t) { is_a_short_vec }; /* { dg-error {incompatible types when initializing type '__bf16' using type 'int16x8_t'} } */
 
   (bfloat16x8_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type '__bf16' using type 'bfloat16x8_t'} } */
-  (int32x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type 'int' using type 'bfloat16x8_t'} } */
+  (int32x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type '(?:long )?int' using type 'bfloat16x8_t'} } */
   (float32x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type 'float' using type 'bfloat16x8_t'} } */
   (int64x2_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type 'long long int' using type 'bfloat16x8_t'} } */
   (float16x8_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type '__fp16' using type 'bfloat16x8_t'} } */
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] testsuite/arm: Fix bfloat16_vector_typecheck_[12].c tests
  2023-11-30 10:15 [PATCH] testsuite/arm: Fix bfloat16_vector_typecheck_[12].c tests Christophe Lyon
@ 2023-11-30 11:45 ` Richard Earnshaw
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw @ 2023-11-30 11:45 UTC (permalink / raw)
  To: Christophe Lyon, gcc-patches, richard.sandiford,
	richard.earnshaw, kyrylo.tkachov



On 30/11/2023 10:15, Christophe Lyon wrote:
> After commit r14-5617-gb8592186611, int32x[24]_t types now use
> elements of 'long int' type instead of 'int' on arm-eabi (it's still
> 'int' on arm-linux-gnueabihf).  Both are 32-bit types anyway.
> 
> This patch adjust the two tests so that they optionnally accept 'long '
> before 'int' in the expected error message.
> 
> 2023-11-30  Christophe Lyon  <christophe.lyon@linaro.org>
> 
> 	gcc/testsuite/
> 	* gcc.target/arm/bfloat16_vector_typecheck_1.c: Update expected
> 	error message.
> 	* gcc.target/arm/bfloat16_vector_typecheck_2.c: Likewise.

OK.

R.

> ---
>   gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_1.c | 4 ++--
>   gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_2.c | 2 +-
>   2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_1.c b/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_1.c
> index f3c350b4cfc..470c13125fb 100644
> --- a/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_1.c
> +++ b/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_1.c
> @@ -119,9 +119,9 @@ bfloat16x4_t footest (bfloat16x4_t vector0)
>     (bfloat16x4_t) { is_a_short_vec }; /* { dg-error {incompatible types when initializing type '__bf16' using type 'int16x4_t'} } */
>   
>     (bfloat16x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type '__bf16' using type 'bfloat16x4_t'} } */
> -  (int32x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type 'int' using type 'bfloat16x4_t'} } */
> +  (int32x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type '(?:long )?int' using type 'bfloat16x4_t'} } */
>     (float32x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type 'float' using type 'bfloat16x4_t'} } */
> -  (int32x2_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type 'int' using type 'bfloat16x4_t'} } */
> +  (int32x2_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type '(?:long )?int' using type 'bfloat16x4_t'} } */
>     (float16x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type '__fp16' using type 'bfloat16x4_t'} } */
>     (int16x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type 'short int' using type 'bfloat16x4_t'} } */
>   
> diff --git a/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_2.c b/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_2.c
> index de0ade52c10..4e0d37907ce 100644
> --- a/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_2.c
> +++ b/gcc/testsuite/gcc.target/arm/bfloat16_vector_typecheck_2.c
> @@ -111,7 +111,7 @@ bfloat16x8_t footest (bfloat16x8_t vector0)
>     (bfloat16x8_t) { is_a_short_vec }; /* { dg-error {incompatible types when initializing type '__bf16' using type 'int16x8_t'} } */
>   
>     (bfloat16x8_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type '__bf16' using type 'bfloat16x8_t'} } */
> -  (int32x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type 'int' using type 'bfloat16x8_t'} } */
> +  (int32x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type '(?:long )?int' using type 'bfloat16x8_t'} } */
>     (float32x4_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type 'float' using type 'bfloat16x8_t'} } */
>     (int64x2_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type 'long long int' using type 'bfloat16x8_t'} } */
>     (float16x8_t) { glob_bfloat_vec }; /* { dg-error {incompatible types when initializing type '__fp16' using type 'bfloat16x8_t'} } */

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-30 11:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-30 10:15 [PATCH] testsuite/arm: Fix bfloat16_vector_typecheck_[12].c tests Christophe Lyon
2023-11-30 11:45 ` Richard Earnshaw

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).