https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90779
--- Comment #6 from Andrew Stubbs <ams at gcc dot gnu.org> --- There's not observable difference. I don't quite follow what the patch is trying to achieve, but seems like adding the variable to the offload variables does not address the issue here. I've added a hack to mkoffload to force the variables listed in the offload_var_table to be declared "global". This is sufficient to run the small testcase correctly. (My larger testcase now has a memory fault, but that could easily be unrelated.) If the symbol is declared local then there's no (straight-forward) way to locate the loaded symbol at runtime, hence the libgomp plugin fail. Setting the symbol global seems like there could be other issues. Given that libgomp does not actually need access to this variable at runtime, perhaps the plugin should just ignore the failure and move on, trusting that unfound variables are not needed?