public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] arm/testsuite: Fix testcase for PR99977
@ 2021-05-19  8:10 Christophe Lyon
  2021-05-19 14:40 ` Richard Earnshaw
  0 siblings, 1 reply; 3+ messages in thread
From: Christophe Lyon @ 2021-05-19  8:10 UTC (permalink / raw)
  To: gcc-patches

Some targets (eg arm-none-uclinuxfdpiceabi) do not support Thumb-1,
and since the testcase forces -march=armv8-m.base, we need to check
whether this option is actually supported.

Using dg-add-options arm_arch_v8m_base ensure that we pass -mthumb as
needed too.

2021-05-19  Christophe Lyon  <christophe.lyon@linaro.org>

	PR 99977
	gcc/testsuite/
	* gcc.target/arm/pr99977.c: Require arm_arch_v8m_base.
---
 gcc/testsuite/gcc.target/arm/pr99977.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/arm/pr99977.c b/gcc/testsuite/gcc.target/arm/pr99977.c
index 7911899d928..db330e4a4a3 100644
--- a/gcc/testsuite/gcc.target/arm/pr99977.c
+++ b/gcc/testsuite/gcc.target/arm/pr99977.c
@@ -1,5 +1,7 @@
 /* { dg-do compile } */
-/* { dg-options "-march=armv8-m.base -mfloat-abi=soft -O2" } */
+/* { dg-require-effective-target arm_arch_v8m_base_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8m_base } */
 _Bool f1(int *p) { return __sync_bool_compare_and_swap (p, -1, 2); }
 _Bool f2(int *p) { return __sync_bool_compare_and_swap (p, -8, 2); }
 int g1(int *p) { return __sync_val_compare_and_swap (p, -1, 2); }
-- 
2.25.1


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

* Re: [PATCH] arm/testsuite: Fix testcase for PR99977
  2021-05-19  8:10 [PATCH] arm/testsuite: Fix testcase for PR99977 Christophe Lyon
@ 2021-05-19 14:40 ` Richard Earnshaw
  2021-05-19 14:47   ` Christophe Lyon
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Earnshaw @ 2021-05-19 14:40 UTC (permalink / raw)
  To: Christophe Lyon, gcc-patches



On 19/05/2021 09:10, Christophe Lyon via Gcc-patches wrote:
> Some targets (eg arm-none-uclinuxfdpiceabi) do not support Thumb-1,
> and since the testcase forces -march=armv8-m.base, we need to check
> whether this option is actually supported.
> 
> Using dg-add-options arm_arch_v8m_base ensure that we pass -mthumb as
> needed too.
> 
> 2021-05-19  Christophe Lyon  <christophe.lyon@linaro.org>
> 
> 	PR 99977
> 	gcc/testsuite/
> 	* gcc.target/arm/pr99977.c: Require arm_arch_v8m_base.
> ---
>   gcc/testsuite/gcc.target/arm/pr99977.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/gcc/testsuite/gcc.target/arm/pr99977.c b/gcc/testsuite/gcc.target/arm/pr99977.c
> index 7911899d928..db330e4a4a3 100644
> --- a/gcc/testsuite/gcc.target/arm/pr99977.c
> +++ b/gcc/testsuite/gcc.target/arm/pr99977.c
> @@ -1,5 +1,7 @@
>   /* { dg-do compile } */
> -/* { dg-options "-march=armv8-m.base -mfloat-abi=soft -O2" } */
> +/* { dg-require-effective-target arm_arch_v8m_base_ok } */
> +/* { dg-options "-O2" } */
> +/* { dg-add-options arm_arch_v8m_base } */
>   _Bool f1(int *p) { return __sync_bool_compare_and_swap (p, -1, 2); }
>   _Bool f2(int *p) { return __sync_bool_compare_and_swap (p, -8, 2); }
>   int g1(int *p) { return __sync_val_compare_and_swap (p, -1, 2); }
> 

OK.

R.

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

* Re: [PATCH] arm/testsuite: Fix testcase for PR99977
  2021-05-19 14:40 ` Richard Earnshaw
@ 2021-05-19 14:47   ` Christophe Lyon
  0 siblings, 0 replies; 3+ messages in thread
From: Christophe Lyon @ 2021-05-19 14:47 UTC (permalink / raw)
  To: Richard Earnshaw; +Cc: gcc Patches

On Wed, 19 May 2021 at 16:40, Richard Earnshaw
<Richard.Earnshaw@foss.arm.com> wrote:
>
>
>
> On 19/05/2021 09:10, Christophe Lyon via Gcc-patches wrote:
> > Some targets (eg arm-none-uclinuxfdpiceabi) do not support Thumb-1,
> > and since the testcase forces -march=armv8-m.base, we need to check
> > whether this option is actually supported.
> >
> > Using dg-add-options arm_arch_v8m_base ensure that we pass -mthumb as
> > needed too.
> >
> > 2021-05-19  Christophe Lyon  <christophe.lyon@linaro.org>
> >
> >       PR 99977
> >       gcc/testsuite/
> >       * gcc.target/arm/pr99977.c: Require arm_arch_v8m_base.
> > ---
> >   gcc/testsuite/gcc.target/arm/pr99977.c | 4 +++-
> >   1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/gcc/testsuite/gcc.target/arm/pr99977.c b/gcc/testsuite/gcc.target/arm/pr99977.c
> > index 7911899d928..db330e4a4a3 100644
> > --- a/gcc/testsuite/gcc.target/arm/pr99977.c
> > +++ b/gcc/testsuite/gcc.target/arm/pr99977.c
> > @@ -1,5 +1,7 @@
> >   /* { dg-do compile } */
> > -/* { dg-options "-march=armv8-m.base -mfloat-abi=soft -O2" } */
> > +/* { dg-require-effective-target arm_arch_v8m_base_ok } */
> > +/* { dg-options "-O2" } */
> > +/* { dg-add-options arm_arch_v8m_base } */
> >   _Bool f1(int *p) { return __sync_bool_compare_and_swap (p, -1, 2); }
> >   _Bool f2(int *p) { return __sync_bool_compare_and_swap (p, -8, 2); }
> >   int g1(int *p) { return __sync_val_compare_and_swap (p, -1, 2); }
> >
>
> OK.
>

Thanks, I also pushed it to gcc-11, where the patch was recently backported.

> R.

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

end of thread, other threads:[~2021-05-19 14:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19  8:10 [PATCH] arm/testsuite: Fix testcase for PR99977 Christophe Lyon
2021-05-19 14:40 ` Richard Earnshaw
2021-05-19 14:47   ` Christophe Lyon

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