[ was: Re: [PATCH, PR82428] Add __builtin_goacc_{gang,worker,vector}_{id,size} ]

On 05/03/2018 12:36 PM, Tom de Vries wrote:
On 01/18/2018 09:55 AM, Tom de Vries wrote:
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/gang-static-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/gang-static-2.c
index 6de739a..e273a79 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/gang-static-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/gang-static-2.c
@@ -1,25 +1,23 @@
-/* { dg-do run { target openacc_nvidia_accel_selected } } */
-/* This code uses nvptx inline assembly guarded with acc_on_device, which is
-   not optimized away at -O0, and then confuses the target assembler.
-   { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
-
  #include <assert.h>
  #include <openacc.h>
+#include <gomp-constants.h>

Hi,

it seems I've broken installed testing of libgomp with this patch. The compiler cannot find gomp-constants.h.

In the build-area testing setup, the compiler can find gomp-constants.h because in libgomp.exp we find:
...
     if { $blddir != "" } {
         ...
         # The top-level include directory, for gomp-constants.h.
         lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/../../include"
     }
...
but this line is not active for installed testing.

Patch below fixes this.

Is this approach ok for trunk?


Assuming no objections, committed as attached.

Thanks,
- Tom
[openacc, testsuite] Allow installed testing of libgomp to find gomp-constants.h

2018-05-07  Tom de Vries  <t...@codesourcery.com>

	PR testsuite/85677
	* testsuite/lib/libgomp.exp (libgomp_init): Move inclusion of top-level
	include directory in ALWAYS_CFLAGS out of $blddir != "" condition.

---
 libgomp/testsuite/lib/libgomp.exp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
index 8ac2446..c41b3e6 100644
--- a/libgomp/testsuite/lib/libgomp.exp
+++ b/libgomp/testsuite/lib/libgomp.exp
@@ -187,9 +187,9 @@ proc libgomp_init { args } {
         lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/.libs"
         lappend ALWAYS_CFLAGS "additional_flags=-I${blddir}"
         lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs"
-	# The top-level include directory, for gomp-constants.h.
-	lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/../../include"
     }
+    # The top-level include directory, for gomp-constants.h.
+    lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/../../include"
     lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/.."
 
     # For build-tree testing, also consider the library paths used for builing.

Reply via email to