Patchwork [testsuite] add effective target pthread to test gcc.dg/pr54782.c

login
register
mail settings
Submitter Greta Yorsh
Date Oct. 10, 2012, 12:16 p.m.
Message ID <000001cda6e1$1a9cd2b0$4fd67810$@yorsh@arm.com>
Download mbox | patch
Permalink /patch/190620/
State New
Headers show

Comments

Greta Yorsh - Oct. 10, 2012, 12:16 p.m.
The test gcc.dg/pr54782.c uses command line option
-ftree-parallelize-loops=2 which implies -pthread and thus the test fails on
targets that do not support pthread, such as arm-none-eabi.

This patch adds effective target check.

Ok for trunk?

Thanks,
Greta

ChangeLog

gcc/testsuite

2012-10-05  Greta Yorsh  <Greta.Yorsh@arm.com>

        * gcc.dg/pr54782.c: Require effective target pthread.
Richard Earnshaw - Oct. 10, 2012, 1:16 p.m.
On 10 Oct 2012, at 13:17, "Greta Yorsh" <greta.yorsh@arm.com> wrote:

> The test gcc.dg/pr54782.c uses command line option
> -ftree-parallelize-loops=2 which implies -pthread and thus the test fails on
> targets that do not support pthread, such as arm-none-eabi.
> 
> This patch adds effective target check.
> 
> Ok for trunk?
> 
> Thanks,
> Greta
> 
> ChangeLog
> 
> gcc/testsuite
> 
> 2012-10-05  Greta Yorsh  <Greta.Yorsh@arm.com>
> 
>        * gcc.dg/pr54782.c: Require effective target pthread.
> <pthread-pr54782.patch.txt>

Ok.

R.

Patch

diff --git a/gcc/testsuite/gcc.dg/pr54782.c b/gcc/testsuite/gcc.dg/pr54782.c
index 2a30754..161b043 100644
--- a/gcc/testsuite/gcc.dg/pr54782.c
+++ b/gcc/testsuite/gcc.dg/pr54782.c
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-require-effective-target pthread } */
 /* { dg-options "-O -ffast-math -ftree-parallelize-loops=2 -g" } */
 
 struct S