From: "Richard Earnshaw (lists)" <Richard.Earnshaw@arm.com>
To: Alexandre Oliva <oliva@adacore.com>, gcc-patches@gcc.gnu.org
Cc: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>,
Mike Stump <mikestump@comcast.net>,
Nick Clifton <nickc@redhat.com>,
Ramana Radhakrishnan <ramana.gcc@gmail.com>
Subject: Re: [PATCH] [testsuite] [arm] accept empty init for bfloat16
Date: Tue, 16 Apr 2024 09:59:56 +0100 [thread overview]
Message-ID: <c7215ae3-7140-4c1e-adb1-3878cc650613@arm.com> (raw)
In-Reply-To: <oro7aac6fg.fsf@lxoliva.fsfla.org>
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.
next prev parent reply other threads:[~2024-04-16 8:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-16 3:50 Alexandre Oliva
2024-04-16 8:59 ` Richard Earnshaw (lists) [this message]
2024-04-16 22:42 ` Mike Stump
2024-04-18 10:56 ` Alexandre Oliva
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=c7215ae3-7140-4c1e-adb1-3878cc650613@arm.com \
--to=richard.earnshaw@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=mikestump@comcast.net \
--cc=nickc@redhat.com \
--cc=oliva@adacore.com \
--cc=ramana.gcc@gmail.com \
--cc=ro@CeBiTec.Uni-Bielefeld.DE \
/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).