Hi Andreas,
On 08/07/17 21:48, Andreas Schwab wrote:
This breaks gcc.dg/asan/pr80168.c on aarch64 -mabi=ilp32:
/opt/gcc/gcc-20170708/gcc/testsuite/gcc.dg/asan/pr80168.c:7:1: internal
compiler error: in emit_library_call_value_1, at calls.c:4555
0x701577 emit_library_call_value_1
../../gcc/calls.c:4554
0x7068d7 emit_library_call_value(rtx_def*, rtx_def*, libcall_type,
machine_mode, int, ...)
../../gcc/calls.c:5159
0xb751d7 asan_emit_allocas_unpoison(rtx_def*, rtx_def*, rtx_insn*)
../../gcc/asan.c:1570
0x71cf1f expand_used_vars
../../gcc/cfgexpand.c:2245
0x71da07 execute
../../gcc/cfgexpand.c:6232
could you check whether attached patch fixes the issue?
-Maxim
Andreas.
diff --git a/gcc/asan.c b/gcc/asan.c
index 95004d7..89c2731 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -1567,9 +1567,10 @@ asan_emit_allocas_unpoison (rtx top, rtx bot, rtx_insn *before)
else
start_sequence ();
rtx ret = init_one_libfunc ("__asan_allocas_unpoison");
+ top = convert_memory_address (ptr_mode, top);
+ bot = convert_memory_address (ptr_mode, bot);
ret = emit_library_call_value (ret, NULL_RTX, LCT_NORMAL, ptr_mode, 2, top,
- TYPE_MODE (pointer_sized_int_node), bot,
- TYPE_MODE (pointer_sized_int_node));
+ ptr_mode, bot, ptr_mode);
do_pending_stack_adjust ();
rtx_insn *insns = get_insns ();