[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-26 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #21 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:95d67762171f83277a5700b270c0d1e2756f83f4 commit r12-1066-g95d67762171f83277a5700b270c0d1e2756f83f4 Author: Jakub Jelinek Date:

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-25 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #20 from Jakub Jelinek --- Yeah, that is likely what happens, I'll debug tomorrow.

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-25 Thread amonakov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #19 from Alexander Monakov --- Ah, does the issue arise because foo._omp_fn.0 is (before the patch) callable in two contexts, in one it's called from host and should be 'omp target entrypoint', and in the other it's called from

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-25 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #18 from Tobias Burnus --- I think the problem is: create_omp_child_function(omp_context*, bool) ... 1916 DECL_ATTRIBUTES (decl) = DECL_ATTRIBUTES (current_function_decl); The code removes then 'omp declare simd' but not 'omp

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-25 Thread amonakov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #17 from Alexander Monakov --- Yes, I'd agree normally it's present in the offload table, but ideally if you're trying to stub out the call, it should not be present in the offload table. I think Tobias is saying that on GIMPLE

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-25 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #16 from Jakub Jelinek --- (In reply to Alexander Monakov from comment #14) > I would break in gdb on cuModuleGetFunction and > > x/s $rdx > > to print the failing symbol (it's the third argument to the function). > > It seems

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-25 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #15 from Jakub Jelinek --- (In reply to Tobias Burnus from comment #13) > (In reply to Tobias Burnus from comment #9) > > not found name: 'test_d_normal._omp_fn.0.kd' > > I think the problem is the following: > > (a) working: >

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-25 Thread amonakov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #14 from Alexander Monakov --- I would break in gdb on cuModuleGetFunction and x/s $rdx to print the failing symbol (it's the third argument to the function). It seems the "inner" entrypoint (which your patch attempted to

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-25 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #13 from Tobias Burnus --- (In reply to Tobias Burnus from comment #9) > not found name: 'test_d_normal._omp_fn.0.kd' I think the problem is the following: (a) working: foo() #pragma target bar() Here, 'foo._omp_fn.0' as as

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-25 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #12 from Jakub Jelinek --- With incremental --- gcc/omp-offload.c.jj2021-05-25 13:43:01.341137265 +0200 +++ gcc/omp-offload.c 2021-05-25 20:07:01.934506823 +0200 @@ -2696,8 +2696,16 @@ pass_omp_target_link::execute

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-25 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 Jakub Jelinek changed: What|Removed |Added CC||amonakov at gcc dot gnu.org ---

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-25 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #10 from Jakub Jelinek --- I didn't have the nvidia binary module loaded and cuda installed when doing the light testing, now I've installed that and see FAIL: libgomp.c/../libgomp.c-c++-common/for-3.c execution test FAIL:

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-25 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #9 from Tobias Burnus --- (In reply to Jakub Jelinek from comment #8) > Lightly tested patch. Just quick manually testing "for-3.c" (I tried -O0 and -O3): * With nvptx offloading, it compiles + links – but at run time, I get on

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-25 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #8 from Jakub Jelinek --- Created attachment 50867 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50867=edit gcc12-pr100573.patch Lightly tested patch.

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-24 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #7 from Jakub Jelinek --- Guess that is because the functions that have #pragma omp target teams directive in it are marked declare target to. So, either we'd need to play with macros etc. to make sure that those functions aren't

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-24 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #6 from Tobias Burnus --- (In reply to Jakub Jelinek from comment #5) > I think we want to fix both for-3.c and for-9.c similarly to > r11-2571-g916c7a201a9a1dc94f2c056a773826a26d1daca9 i.e. > #define DO_PRAGMA(x) _Pragma (#x) >

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-18 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #5 from Jakub Jelinek --- The intent of this particular test is to test how orphaned distribute works and was done before the host teams construct support has been added, which means we do not want the target teams visible in the

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-18 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #4 from Jakub Jelinek --- (In reply to Tom de Vries from comment #3) > Hmm, I reproduced the problem on the original test-case: > libgomp.c-c++-common/for-3.c, and minimized from there: > ... > $ cat

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-18 Thread vries at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #3 from Tom de Vries --- Hmm, I reproduced the problem on the original test-case: libgomp.c-c++-common/for-3.c, and minimized from there: ... $ cat libgomp/testsuite/libgomp.c-c++-common/for-3.c /* { dg-additional-options

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-18 Thread vries at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #2 from Tom de Vries --- (In reply to Tobias Burnus from comment #1) > Created attachment 50803 [details] > Reduced testcase - works with hostfall back but fails with GCN and nvptx Is this not an invalid test-case? The semantics

[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c

2021-05-12 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573 --- Comment #1 from Tobias Burnus --- Created attachment 50803 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50803=edit Reduced testcase - works with hostfall back but fails with GCN and nvptx