https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85230
--- Comment #11 from chefmax at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #10) > Unfortunately that doesn't work, because the second argument to > __asan_allocas_unpoison is incorrect then. Unfortunately we can't use new_sp as a second parameter for __asan_allocas_unpoison, because e.g. for PowerPC it doesn't point to a new (restored) dynamic stack area (http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#DYNAM-STACK). That's why current implementation inserts __asan_allocas_unpoison after __builtin_stack_restore and uses virtual_dynamic_stack_rtx as a second argument. We can probably use a 'new_sp + STACK_DYNAMIC_OFFSET' for a second argument for __asan_allocas_unpoison inside expand_asan_emit_allocas_unpoison, but AFAIU STACK_DYNAMIC_OFFSET becomes valid only in pass_instantiate_virtual_regs (so we can't rely on it during pass_expand).