Attached is the updated patch. Main changes: - File names shown that violate the requires-clause-must-be-same requirement Taken from the offload_vars/funcs context (if available), otherwise (that's no 'omp target'/'omp declare target' but just 'omp target update/data' in the TU), the *.o file name is used. (thanks to richi + jakub for the susggestions!) - Uses GOMP_register_var to pass the mask to libgomp (and no longer a weak variable) - 'omp declare target' is not regarded as being used -> pending OpenMP lang spec clarification - 'omp target update' is for C/C++ - Properly handle is used by-target constucts for Fortran - Save requires (and empty offload table) in the *.o file, even if it is only using 'omp target (enter/exit) data' Thanks goes to Jakub for many useful suggestions! Tested without offloading configured and with nvptx and amdgcn offloading (all on x86_64-gnu-linux). OK? Or does anyone have more useful suggestions? Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955