https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69876
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Sure. But there is the other case, say int x; #pragma omp target defaultmap(tofrom: scalar) // explicit or implicit map(tofrom:x) { x = 6; } This is similar to shared clause on parallel or task etc.; where we often need to pass a value, even when we don't know if it will be used uninitialized or not. Better not to warn in that case IMHO. So I'd say if we want to warn, we would need to perform some post-SSA IPA analysis of the outlined regions together with the original functions.