From: Qing Zhao Date: Tue, 17 Oct 2017 14:16:35 +0000 (+0000) Subject: re PR middle-end/80295 (ICE in __builtin_update_setjmp_buf expander) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4887028b508e023e91d4ab87aeccfae134c4ab45;p=gcc.git re PR middle-end/80295 (ICE in __builtin_update_setjmp_buf expander) gcc/ChangeLog 2017-10-17 Qing Zhao Wilco Dijkstra * builtins.c (expand_builtin_update_setjmp_buf): Add a converstion to Pmode from the buf_addr. gcc/testsuite/ChangeLog 2017-10-17 Qing Zhao Wilco Dijkstra PR middle-end/80295 * gcc.target/aarch64/pr80295.c: New test. Co-Authored-By: Wilco Dijkstra From-SVN: r253814 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7baed9da49a..b53ae8b3240 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-10-17 Qing Zhao + Wilco Dijkstra + + * builtins.c (expand_builtin_update_setjmp_buf): Add a + converstion to Pmode from the buf_addr. + 2017-10-17 Richard Biener * graphite-dependences.c (scop_get_reads_and_writes): Change diff --git a/gcc/builtins.c b/gcc/builtins.c index ff049aa9d37..28fc76b5fc0 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -1199,6 +1199,7 @@ void expand_builtin_update_setjmp_buf (rtx buf_addr) { machine_mode sa_mode = STACK_SAVEAREA_MODE (SAVE_NONLOCAL); + buf_addr = convert_memory_address (Pmode, buf_addr); rtx stack_save = gen_rtx_MEM (sa_mode, memory_address diff --git a/gcc/testsuite/gcc.target/aarch64/pr80295.c b/gcc/testsuite/gcc.target/aarch64/pr80295.c new file mode 100644 index 00000000000..b3866d8d6a9 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/pr80295.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-options "-mabi=ilp32" } */ + +void f (void *b) +{ + __builtin_update_setjmp_buf (b); +} +