diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c index 4b7ab5e83c57c7b37f72379604c667d6f1fb8117..7e141a85f310fd66c32ed00b2bdd1328ea16efe1 100644 --- a/libgomp/plugin/plugin-gcn.c +++ b/libgomp/plugin/plugin-gcn.c @@ -1524,9 +1524,11 @@ init_hsa_context (void) init_environment_variables (); if (!init_hsa_runtime_functions ()) { - GCN_WARNING ("Run-time could not be dynamically opened\n"); + const char *msg = "Run-time could not be dynamically opened"; if (suppress_host_fallback) - GOMP_PLUGIN_fatal ("GCN host fallback has been suppressed"); + GOMP_PLUGIN_fatal ("%s\n", msg); + else + GCN_WARNING ("%s\n", msg); return false; } status = hsa_fns.hsa_init_fn (); @@ -3855,15 +3857,9 @@ GOMP_OFFLOAD_can_run (void *fn_ptr) init_kernel (kernel); if (kernel->initialization_failed) - goto failure; + GOMP_PLUGIN_fatal ("kernel initialization failed"); return true; - -failure: - if (suppress_host_fallback) - GOMP_PLUGIN_fatal ("GCN host fallback has been suppressed"); - GCN_WARNING ("GCN target cannot be launched, doing a host fallback\n"); - return false; } /* Allocate memory on device N. */