From: Jia-Wei Chen Date: Tue, 19 Apr 2022 03:11:24 +0000 (+0800) Subject: testsuite: Skip target not support -pthread [PR104676]. X-Git-Tag: basepoints/gcc-13~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5b66a905322262483af5c4ca6cb6676c24e1f3f;p=thirdparty%2Fgcc.git testsuite: Skip target not support -pthread [PR104676]. 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/ChangeLog PR target/104676 * gcc.dg/torture/pr104676.c: Add "{target pthread}" check. --- diff --git a/gcc/testsuite/gcc.dg/torture/pr104676.c b/gcc/testsuite/gcc.dg/torture/pr104676.c index 50845bb9e150..0991b78f7581 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;