public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite: Skip target not support -pthread [pr104676].
@ 2022-04-19  3:11 jiawei
  2022-04-19  7:08 ` Richard Biener
  0 siblings, 1 reply; 3+ messages in thread
From: jiawei @ 2022-04-19  3:11 UTC (permalink / raw)
  To: gcc-patches
  Cc: rguenther, palmer, jim.wilson.gcc, kito.cheng, wuwei2016, jiawei

The "ftree-parallelize-loops=" imply -pthread option in gcc/gcc.cc,
some target are not support pthread like elf target use newlib,
and will get an error:

"*-*-elf-gcc: error: unrecognized command-line option '-pthread'"

so we add an additional condition "{target pthread}" to make sure the
dg-additional-options runs on support targets.

---
 gcc/testsuite/gcc.dg/torture/pr104676.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/torture/pr104676.c b/gcc/testsuite/gcc.dg/torture/pr104676.c
index 50845bb9e15..0991b78f758 100644
--- a/gcc/testsuite/gcc.dg/torture/pr104676.c
+++ b/gcc/testsuite/gcc.dg/torture/pr104676.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-additional-options "-ftree-loop-distribution -ftree-parallelize-loops=2" } */
+/* { dg-additional-options "-ftree-loop-distribution -ftree-parallelize-loops=2" { target pthread } } */
 
 struct S {
   int f;
-- 
2.25.1


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

* Re: [PATCH] testsuite: Skip target not support -pthread [pr104676].
  2022-04-19  3:11 [PATCH] testsuite: Skip target not support -pthread [pr104676] jiawei
@ 2022-04-19  7:08 ` Richard Biener
  2022-04-28  3:23   ` Kito Cheng
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2022-04-19  7:08 UTC (permalink / raw)
  To: jiawei; +Cc: gcc-patches, palmer, jim.wilson.gcc, kito.cheng, wuwei2016

On Tue, 19 Apr 2022, jiawei wrote:

> The "ftree-parallelize-loops=" imply -pthread option in gcc/gcc.cc,
> some target are not support pthread like elf target use newlib,
> and will get an error:
> 
> "*-*-elf-gcc: error: unrecognized command-line option '-pthread'"
> 
> so we add an additional condition "{target pthread}" to make sure the
> dg-additional-options runs on support targets.

OK.

> ---
>  gcc/testsuite/gcc.dg/torture/pr104676.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gcc/testsuite/gcc.dg/torture/pr104676.c b/gcc/testsuite/gcc.dg/torture/pr104676.c
> index 50845bb9e15..0991b78f758 100644
> --- a/gcc/testsuite/gcc.dg/torture/pr104676.c
> +++ b/gcc/testsuite/gcc.dg/torture/pr104676.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-additional-options "-ftree-loop-distribution -ftree-parallelize-loops=2" } */
> +/* { dg-additional-options "-ftree-loop-distribution -ftree-parallelize-loops=2" { target pthread } } */
>  
>  struct S {
>    int f;
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Ivo Totev; HRB 36809 (AG Nuernberg)

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

* Re: [PATCH] testsuite: Skip target not support -pthread [pr104676].
  2022-04-19  7:08 ` Richard Biener
@ 2022-04-28  3:23   ` Kito Cheng
  0 siblings, 0 replies; 3+ messages in thread
From: Kito Cheng @ 2022-04-28  3:23 UTC (permalink / raw)
  To: Richard Biener; +Cc: jiawei, wuwei2016, GCC Patches, Kito Cheng

Committed to trunk.

On Tue, Apr 19, 2022 at 3:08 PM Richard Biener via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> On Tue, 19 Apr 2022, jiawei wrote:
>
> > The "ftree-parallelize-loops=" imply -pthread option in gcc/gcc.cc,
> > some target are not support pthread like elf target use newlib,
> > and will get an error:
> >
> > "*-*-elf-gcc: error: unrecognized command-line option '-pthread'"
> >
> > so we add an additional condition "{target pthread}" to make sure the
> > dg-additional-options runs on support targets.
>
> OK.
>
> > ---
> >  gcc/testsuite/gcc.dg/torture/pr104676.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/gcc/testsuite/gcc.dg/torture/pr104676.c b/gcc/testsuite/gcc.dg/torture/pr104676.c
> > index 50845bb9e15..0991b78f758 100644
> > --- a/gcc/testsuite/gcc.dg/torture/pr104676.c
> > +++ b/gcc/testsuite/gcc.dg/torture/pr104676.c
> > @@ -1,5 +1,5 @@
> >  /* { dg-do compile } */
> > -/* { dg-additional-options "-ftree-loop-distribution -ftree-parallelize-loops=2" } */
> > +/* { dg-additional-options "-ftree-loop-distribution -ftree-parallelize-loops=2" { target pthread } } */
> >
> >  struct S {
> >    int f;
> >
>
> --
> Richard Biener <rguenther@suse.de>
> SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
> Germany; GF: Ivo Totev; HRB 36809 (AG Nuernberg)

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

end of thread, other threads:[~2022-04-28  3:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19  3:11 [PATCH] testsuite: Skip target not support -pthread [pr104676] jiawei
2022-04-19  7:08 ` Richard Biener
2022-04-28  3:23   ` Kito Cheng

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