https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117455
--- Comment #6 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- Info: -ftrampoline-impl=[stack|heap] By default, trampolines are generated on stack. However, certain platforms (such as the Apple M1) do not permit an executable stack. Compiling with -ftrampoline-impl=heap generate calls to __gcc_nested_func_ptr_created and __gcc_nested_func_ptr_deleted in order to allocate and deallocate trampoline space on the executable heap. These functions are implemented in libgcc, and will only be provided on specific targets: x86_64 Darwin, x86_64 and aarch64 Linux. PLEASE NOTE: Heap trampolines are not guaranteed to be correctly deallocated if you setjmp, instantiate nested functions, and then longjmp back to a state prior to having allocated those nested functions. Is there a security issue? Above my pay range to answer. Should this just be the gfortran default where applicable? $ gfc test1.f90 /usr/bin/ld: warning: /tmp/ccOTgxKq.o: requires executable stack (because the .note.GNU-stack section is executable) $ gfc -ftrampoline-impl=heap test1.f90 $