https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105030
--- Comment #10 from rguenther at suse dot de <rguenther at suse dot de> --- On Mon, 28 Mar 2022, guihaoc at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105030 > > --- Comment #9 from HaoChen Gui <guihaoc at gcc dot gnu.org> --- > Escaped for 'atemp' doesn't be set with Fortran source code, while it's set > with C source code. 'auto_var_in_fn_p + pt_solution_includes' works for > Fortran > code. But if the function is a head of the loop in Fortran, it's still unsafe > for multithreaded. The fortran standard requires you to annotate the parameter with POINTER to make it escaped (or to make it threaded). But still the only way for a thread (but not a coroutine for example!) to access stack from another thread is to make a pointer to an object on the stack escape to it.