Hello. There's a patch for ilp32 where we should use Pmode instead of ptr_mode.
Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: PR sanitizer/95634 * asan.c (asan_emit_stack_protection): Fix emission for ilp32 by using Pmode instead of ptr_mode. --- gcc/asan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/asan.c b/gcc/asan.c index e015fa3ec9b..5d123a3e8a6 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -1610,8 +1610,8 @@ asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb, = (1 << (use_after_return_class + 6)); offset -= GET_MODE_SIZE (ptr_mode); mem = gen_rtx_MEM (ptr_mode, base); - mem = adjust_address (mem, ptr_mode, offset); - rtx addr = gen_reg_rtx (ptr_mode); + mem = adjust_address (mem, Pmode, offset); + rtx addr = gen_reg_rtx (Pmode); emit_move_insn (addr, mem); mem = gen_rtx_MEM (QImode, addr); emit_move_insn (mem, const0_rtx); -- 2.26.2