aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQing Zhao <qing.zhao@oracle.com>2017-10-17 14:16:35 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2017-10-17 14:16:35 +0000
commit4887028b508e023e91d4ab87aeccfae134c4ab45 (patch)
tree0cfd77b342ca3a2b3d4f3bf6e6a605cdbcb501f0
parentf371d337de62854ee1a0feae28ea2ce3226f15e7 (diff)
downloadgcc-4887028b508e023e91d4ab87aeccfae134c4ab45.zip
gcc-4887028b508e023e91d4ab87aeccfae134c4ab45.tar.gz
gcc-4887028b508e023e91d4ab87aeccfae134c4ab45.tar.bz2
re PR middle-end/80295 (ICE in __builtin_update_setjmp_buf expander)
gcc/ChangeLog 2017-10-17 Qing Zhao <qing.zhao@oracle.com> Wilco Dijkstra <wilco.dijkstra@arm.com> * builtins.c (expand_builtin_update_setjmp_buf): Add a converstion to Pmode from the buf_addr. gcc/testsuite/ChangeLog 2017-10-17 Qing Zhao <qing.zhao@oracle.com> Wilco Dijkstra <wilco.dijkstra@arm.com> PR middle-end/80295 * gcc.target/aarch64/pr80295.c: New test. Co-Authored-By: Wilco Dijkstra <wdijkstr@arm.com> From-SVN: r253814
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/builtins.c1
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr80295.c8
3 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7baed9d..b53ae8b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2017-10-17 Qing Zhao <qing.zhao@oracle.com>
+ Wilco Dijkstra <wilco.dijkstra@arm.com>
+
+ * builtins.c (expand_builtin_update_setjmp_buf): Add a
+ converstion to Pmode from the buf_addr.
+
2017-10-17 Richard Biener <rguenther@suse.de>
* graphite-dependences.c (scop_get_reads_and_writes): Change
diff --git a/gcc/builtins.c b/gcc/builtins.c
index ff049aa9..28fc76b 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 0000000..b3866d8
--- /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);
+}
+