This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On 19/12/13 10:35, Jakub Jelinek wrote:
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.
Thanks for the hint, it now passes on bare metal arm.
Patch attached. Ok for trunk?

Kyrill

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

    * c-c++-common/cilk-plus/SE/ef_error.c: Use -fopen-simd.


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 --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 478bfa1..5312992 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,6 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-fcilkplus -fopenmp" } */
-/* { dg-require-effective-target fopenmp } */
+/* { dg-options "-fcilkplus -fopenmp-simd" } */
 
 #pragma omp declare simd linear(y:1) simdlen(4) 
 __attribute__((vector (linear (y:1), vectorlength(4))))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]