https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81690
Tom de Vries <vries at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |nvptx CC| |amonakov at gcc dot gnu.org, | |jakub at gcc dot gnu.org --- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> --- Reaction from Jakub ( https://gcc.gnu.org/ml/gcc-patches/2016-11/msg01026.html ) : ... > Two due to tests using 'usleep' in a target region: > FAIL: libgomp.c/target-32.c (test for excess errors) > FAIL: libgomp.c/thread-limit-2.c (test for excess errors) Could these be "solved" say by something like: --- libgomp/testsuite/libgomp.c/target-32.c.jj 2015-11-14 19:38:31.000000000 +0100 +++ libgomp/testsuite/libgomp.c/target-32.c 2016-11-11 09:29:50.411072865 +0100 @@ -1,7 +1,20 @@ #include <stdlib.h> #include <unistd.h> +#include <omp.h> -int main () +static inline +do_sleep (int cnt) +{ + int i; + if (omp_is_initial_device ()) + usleep (cnt); + else + for (i = 0; i < 10 * cnt; i++) + asm volatile ("" : : : "memory"); +} + +int +main () { int a = 0, b = 0, c = 0, d[7]; plus folding omp_is_initial_device as a builtin in the offloading compiler (which we want to do anyway and similar builtin is folded for OpenACC already)? ...