https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90743
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I don't understand how you could do that and why. Unless you perform a whole function optimization, gimplification and omp lowering and expansion etc. work on individual statements, there is no analysis on what happens before or after, that is done in subsequent passes, say SRA or FRE and others. The code in the region could deallocate (c) or do similar stuff, and while that might be undefined with some offloading specs under some conditions, there are many cases where it must be valid.