* [PATCH] [testsuite] [arm] accept empty init for bfloat16
@ 2024-04-16 3:50 Alexandre Oliva
2024-04-16 8:59 ` Richard Earnshaw (lists)
2024-04-16 22:42 ` Mike Stump
0 siblings, 2 replies; 4+ messages in thread
From: Alexandre Oliva @ 2024-04-16 3:50 UTC (permalink / raw)
To: gcc-patches
Cc: Rainer Orth, Mike Stump, Nick Clifton, Richard Earnshaw,
Ramana Radhakrishnan
Complete r13-2205, adjusting an arm-specific test that expects a
no-longer-issued error at an empty initializer.
Regstrapped on x86_64-linux-gnu. Also tested with gcc-13 on arm-,
aarch64-, x86- and x86_64-vxworks7r2. Ok to install?
for gcc/testsuite/ChangeLog
* gcc.target/arm/bfloat16_scalar_typecheck.c: Accept C23
empty initializers.
---
.../gcc.target/arm/bfloat16_scalar_typecheck.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c b/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c
index 8c80c55bc9f4c..04ede93bda152 100644
--- a/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c
+++ b/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c
@@ -42,7 +42,7 @@ bfloat16_t footest (bfloat16_t scalar0)
short initi_1_4 = glob_bfloat; /* { dg-error {invalid conversion from type 'bfloat16_t'} } */
double initi_1_5 = glob_bfloat; /* { dg-error {invalid conversion from type 'bfloat16_t'} } */
- bfloat16_t scalar2_1 = {}; /* { dg-error {empty scalar initializer} } */
+ bfloat16_t scalar2_1 = {};
bfloat16_t scalar2_2 = { glob_bfloat };
bfloat16_t scalar2_3 = { 0 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
bfloat16_t scalar2_4 = { 0.1 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
@@ -94,7 +94,7 @@ bfloat16_t footest (bfloat16_t scalar0)
/* Compound literals. */
- (bfloat16_t) {}; /* { dg-error {empty scalar initializer} } */
+ (bfloat16_t) {};
(bfloat16_t) { glob_bfloat };
(bfloat16_t) { 0 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
(bfloat16_t) { 0.1 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
--
Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/
Free Software Activist GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [testsuite] [arm] accept empty init for bfloat16
2024-04-16 3:50 [PATCH] [testsuite] [arm] accept empty init for bfloat16 Alexandre Oliva
@ 2024-04-16 8:59 ` Richard Earnshaw (lists)
2024-04-16 22:42 ` Mike Stump
1 sibling, 0 replies; 4+ messages in thread
From: Richard Earnshaw (lists) @ 2024-04-16 8:59 UTC (permalink / raw)
To: Alexandre Oliva, gcc-patches
Cc: Rainer Orth, Mike Stump, Nick Clifton, Ramana Radhakrishnan
On 16/04/2024 04:50, Alexandre Oliva wrote:
>
> Complete r13-2205, adjusting an arm-specific test that expects a
> no-longer-issued error at an empty initializer.
>
> Regstrapped on x86_64-linux-gnu. Also tested with gcc-13 on arm-,
> aarch64-, x86- and x86_64-vxworks7r2. Ok to install?
>
>
> for gcc/testsuite/ChangeLog
>
> * gcc.target/arm/bfloat16_scalar_typecheck.c: Accept C23
> empty initializers.
> ---
> .../gcc.target/arm/bfloat16_scalar_typecheck.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c b/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c
> index 8c80c55bc9f4c..04ede93bda152 100644
> --- a/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c
> +++ b/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c
> @@ -42,7 +42,7 @@ bfloat16_t footest (bfloat16_t scalar0)
> short initi_1_4 = glob_bfloat; /* { dg-error {invalid conversion from type 'bfloat16_t'} } */
> double initi_1_5 = glob_bfloat; /* { dg-error {invalid conversion from type 'bfloat16_t'} } */
>
> - bfloat16_t scalar2_1 = {}; /* { dg-error {empty scalar initializer} } */
> + bfloat16_t scalar2_1 = {};
> bfloat16_t scalar2_2 = { glob_bfloat };
> bfloat16_t scalar2_3 = { 0 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
> bfloat16_t scalar2_4 = { 0.1 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
> @@ -94,7 +94,7 @@ bfloat16_t footest (bfloat16_t scalar0)
>
> /* Compound literals. */
>
> - (bfloat16_t) {}; /* { dg-error {empty scalar initializer} } */
> + (bfloat16_t) {};
> (bfloat16_t) { glob_bfloat };
> (bfloat16_t) { 0 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
> (bfloat16_t) { 0.1 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
>
This test is checking for errors. Perhaps it would be better to select an older version of the standard and then set pedantic-error mode.
R.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [testsuite] [arm] accept empty init for bfloat16
2024-04-16 3:50 [PATCH] [testsuite] [arm] accept empty init for bfloat16 Alexandre Oliva
2024-04-16 8:59 ` Richard Earnshaw (lists)
@ 2024-04-16 22:42 ` Mike Stump
2024-04-18 10:56 ` Alexandre Oliva
1 sibling, 1 reply; 4+ messages in thread
From: Mike Stump @ 2024-04-16 22:42 UTC (permalink / raw)
To: Alexandre Oliva
Cc: gcc-patches, Rainer Orth, Nick Clifton, Richard Earnshaw,
Ramana Radhakrishnan
On Apr 15, 2024, at 8:50 PM, Alexandre Oliva <oliva@adacore.com> wrote:
>
> Complete r13-2205, adjusting an arm-specific test that expects a
> no-longer-issued error at an empty initializer.
>
> Regstrapped on x86_64-linux-gnu. Also tested with gcc-13 on arm-,
> aarch64-, x86- and x86_64-vxworks7r2. Ok to install?
I did see Richard's comment. First order is the current language should work. If people who put in the changing language want a test case for the old language, it is reasonable to expect them to do that work. Indeed, I kinda expect coverage already for that feature in another test case.
Ok.
> for gcc/testsuite/ChangeLog
>
> * gcc.target/arm/bfloat16_scalar_typecheck.c: Accept C23
> empty initializers.
> ---
> .../gcc.target/arm/bfloat16_scalar_typecheck.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c b/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c
> index 8c80c55bc9f4c..04ede93bda152 100644
> --- a/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c
> +++ b/gcc/testsuite/gcc.target/arm/bfloat16_scalar_typecheck.c
> @@ -42,7 +42,7 @@ bfloat16_t footest (bfloat16_t scalar0)
> short initi_1_4 = glob_bfloat; /* { dg-error {invalid conversion from type 'bfloat16_t'} } */
> double initi_1_5 = glob_bfloat; /* { dg-error {invalid conversion from type 'bfloat16_t'} } */
>
> - bfloat16_t scalar2_1 = {}; /* { dg-error {empty scalar initializer} } */
> + bfloat16_t scalar2_1 = {};
> bfloat16_t scalar2_2 = { glob_bfloat };
> bfloat16_t scalar2_3 = { 0 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
> bfloat16_t scalar2_4 = { 0.1 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
> @@ -94,7 +94,7 @@ bfloat16_t footest (bfloat16_t scalar0)
>
> /* Compound literals. */
>
> - (bfloat16_t) {}; /* { dg-error {empty scalar initializer} } */
> + (bfloat16_t) {};
> (bfloat16_t) { glob_bfloat };
> (bfloat16_t) { 0 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
> (bfloat16_t) { 0.1 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
>
> --
> Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/
> Free Software Activist GNU Toolchain Engineer
> More tolerance and less prejudice are key for inclusion and diversity
> Excluding neuro-others for not behaving ""normal"" is *not* inclusive
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [testsuite] [arm] accept empty init for bfloat16
2024-04-16 22:42 ` Mike Stump
@ 2024-04-18 10:56 ` Alexandre Oliva
0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2024-04-18 10:56 UTC (permalink / raw)
To: Mike Stump
Cc: gcc-patches, Rainer Orth, Nick Clifton, Richard Earnshaw,
Ramana Radhakrishnan
On Apr 16, 2024, Mike Stump <mikestump@comcast.net> wrote:
> Indeed, I kinda expect coverage already for that feature in
> another test case.
*nod*, jsm added gcc.dg/c11-empty-init-[123].c (and more) in the patch
that implemented this c23 feature.
--
Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/
Free Software Activist GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-04-18 10:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-16 3:50 [PATCH] [testsuite] [arm] accept empty init for bfloat16 Alexandre Oliva
2024-04-16 8:59 ` Richard Earnshaw (lists)
2024-04-16 22:42 ` Mike Stump
2024-04-18 10:56 ` Alexandre Oliva
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).