This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][committed] Add fopenmp effective target check to c-c++-common/cilk-plus/SE/ef_error.c
- From: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, "Iyer, Balaji V" <balaji dot v dot iyer at intel dot com>
- Date: Thu, 19 Dec 2013 16:33:25 +0000
- Subject: Re: [PATCH][committed] Add fopenmp effective target check to c-c++-common/cilk-plus/SE/ef_error.c
- Authentication-results: sourceware.org; auth=none
- References: <52B2CB89 dot 2080200 at arm dot com> <20131219103539 dot GQ892 at tucnak dot redhat dot com>
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))))