From: Martin Liska Date: Thu, 11 Jun 2020 07:34:41 +0000 (+0200) Subject: asan: fix RTX emission for ilp32 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8cff672cb9a132d3d3158c2edfc9a64b55292b80;p=gcc.git asan: fix RTX emission for ilp32 gcc/ChangeLog: PR sanitizer/95634 * asan.c (asan_emit_stack_protection): Fix emission for ilp32 by using Pmode instead of ptr_mode. Co-Authored-By: Jakub Jelinek --- diff --git a/gcc/asan.c b/gcc/asan.c index e015fa3ec9b..9c9aa4cae35 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -1613,6 +1613,7 @@ asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb, mem = adjust_address (mem, ptr_mode, offset); rtx addr = gen_reg_rtx (ptr_mode); emit_move_insn (addr, mem); + addr = convert_memory_address (Pmode, addr); mem = gen_rtx_MEM (QImode, addr); emit_move_insn (mem, const0_rtx); }