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, PR82428] Add __builtin_goacc_{gang,worker,vector}_{id,size}


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?

Thanks,
- Tom

Index: libgomp/testsuite/lib/libgomp.exp
===================================================================
--- libgomp/testsuite/lib/libgomp.exp (revision 259880)
+++ libgomp/testsuite/lib/libgomp.exp (working copy)
@@ -186,9 +186,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.


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