Hello. This is fix of compilation error I see with --enable-offload-targets=nvptx-none=. It's explained in very detail way here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83007#c1
Ready for trunk? Martin libgomp/ChangeLog: 2017-11-20 Martin Liska <mli...@suse.cz> * target.c (gomp_target_init): Use proper string operation. --- libgomp/target.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libgomp/target.c b/libgomp/target.c index 8ac05e8c641..4838dc98de6 100644 --- a/libgomp/target.c +++ b/libgomp/target.c @@ -2668,7 +2668,10 @@ gomp_target_init (void) } strcpy (plugin_name, prefix); - strncat (plugin_name, cur, next ? next - cur : strlen (cur)); + if (next) + strncat (plugin_name, cur, next - cur); + else + strcpy (plugin_name, cur); strcat (plugin_name, suffix); if (gomp_load_plugin_for_device (¤t_device, plugin_name))