From 4887028b508e023e91d4ab87aeccfae134c4ab45 Mon Sep 17 00:00:00 2001 From: Qing Zhao Date: Tue, 17 Oct 2017 14:16:35 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/builtins.c | 1 + gcc/testsuite/gcc.target/aarch64/pr80295.c | 8 ++++++++ 3 files changed, 15 insertions(+) create mode 100644 gcc/testsuite/gcc.target/aarch64/pr80295.c 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); +} + -- 2.30.2