diff mbox

[committed] Add fopenmp effective target check to c-c++-common/cilk-plus/SE/ef_error.c

Message ID 52B2CB89.2080200@arm.com
State New
Headers show

Commit Message

Kyrylo Tkachov Dec. 19, 2013, 10:33 a.m. UTC
Hi all,

The recently added c-c++-common/cilk-plus/SE/ef_error.c test needs an effective 
target check for fopenmp, otherwise it will fail to compile on targets that 
don't support openmp, for example the bare metal arm-none-eabi.

I've committed the attached patch to fix that as r206109.

Thanks,
Kyrill

2013-12-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * c-c++-common/cilk-plus/SE/ef_error.c: Add fopenmp effective
     target check.

Comments

Jakub Jelinek Dec. 19, 2013, 10:35 a.m. UTC | #1
On Thu, Dec 19, 2013 at 10:33:45AM +0000, Kyrill Tkachov wrote:
> The recently added c-c++-common/cilk-plus/SE/ef_error.c test needs
> an effective target check for fopenmp, otherwise it will fail to
> compile on targets that don't support openmp, for example the bare
> metal arm-none-eabi.

Or just use -fopenmp-simd instead of -fopenmp?  That one doesn't
depend on the runtime library and thus should be supported even on
bare metal targets etc.

> 2013-12-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
> 
>     * c-c++-common/cilk-plus/SE/ef_error.c: Add fopenmp effective
>     target check.

> diff --git a/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c b/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c
> index 6a4b4a4..478bfa1 100644
> --- a/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c
> +++ b/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-options "-fcilkplus -fopenmp" } */
> +/* { dg-require-effective-target fopenmp } */
>  
>  #pragma omp declare simd linear(y:1) simdlen(4) 
>  __attribute__((vector (linear (y:1), vectorlength(4))))

	Jakub
diff mbox

Patch

diff --git a/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c b/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c
index 6a4b4a4..478bfa1 100644
--- a/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c
+++ b/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-fcilkplus -fopenmp" } */
+/* { dg-require-effective-target fopenmp } */
 
 #pragma omp declare simd linear(y:1) simdlen(4) 
 __attribute__((vector (linear (y:1), vectorlength(4))))