https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95622
--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> --- I am not sure whether this is a sensible solution, but it fixes the issue for c-c++-common/goacc/kernels-alias-ipa-pta-2.c ... diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 529ec3a5b80..c93e9b46d8d 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -8132,7 +8132,7 @@ refered_from_nonlocal_fn (struct cgraph_node *node, void *data) *nonlocal_p |= (node->used_from_other_partition || DECL_EXTERNAL (node->decl) || TREE_PUBLIC (node->decl) - || node->force_output + || (node->force_output && !node->offloadable) || lookup_attribute ("noipa", DECL_ATTRIBUTES (node->decl))); return false; } @@ -8195,7 +8195,7 @@ ipa_pta_execute (void) bool nonlocal_p = (node->used_from_other_partition || DECL_EXTERNAL (node->decl) || TREE_PUBLIC (node->decl) - || node->force_output + || (node->force_output && !node->offloadable) || lookup_attribute ("noipa", DECL_ATTRIBUTES (node->decl))); node->call_for_symbol_thunks_and_aliases (refered_from_nonlocal_fn,