[Bug libgomp/100573] [OpenMP] 'omp target teams' fails with nvptx and GCN offloading: FAIL libgomp.c-c++-common/for-3.c + for-9.c
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue May 25 18:28:38 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100573
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
With incremental
--- gcc/omp-offload.c.jj 2021-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 (function
{
gimple_stmt_iterator gsi;
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
- if (walk_gimple_stmt (&gsi, NULL, find_link_var_op, NULL))
- gimple_regimplify_operands (gsi_stmt (gsi), &gsi);
+ {
+ if (gimple_call_builtin_p (gsi_stmt (gsi), BUILT_IN_GOMP_TARGET))
+ {
+ /* Nullify the second argument of __builtin_GOMP_target_ext. */
+ gimple_call_set_arg (gsi_stmt (gsi), 1, null_pointer_node);
+ update_stmt (gsi_stmt (gsi));
+ }
+ if (walk_gimple_stmt (&gsi, NULL, find_link_var_op, NULL))
+ gimple_regimplify_operands (gsi_stmt (gsi), &gsi);
+ }
}
return 0;
I see it fail with
Linking
Link complete: 0.000000ms
Link log info : 240 bytes gmem, 1414 bytes cmem[3]
libgomp: cuModuleGetFunction error: named symbol not found
libgomp: Cannot map target functions or variables (expected 9, have 4294967295)
(target-41.c with GOMP_DEBUG=1), but it is unclear from that which named symbol
wasn't found.
Any idea how to troubleshoot what is missing?
More information about the Gcc-bugs
mailing list