This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix aarch64 ILP32 ICE with vaarg gimplified code
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: richard dot earnshaw at arm dot com, james dot greenhalgh at arm dot com, marcus dot shawcroft at arm dot com
- Date: Thu, 26 Apr 2018 14:09:34 +0200 (CEST)
- Subject: [PATCH] Fix aarch64 ILP32 ICE with vaarg gimplified code
Seen by Christophe Lyon, verified with a cross that this fixes the
issue.
aarch64 people, can you please test & commit this?
Thanks,
Richard.
2018-04-26 Richard Biener <rguenther@suse.de>
* config/aarch64/aarch64.c: Simplify ap.__stack advance and
fix for ILP32.
Index: gcc/config/aarch64/aarch64.c
===================================================================
--- gcc/config/aarch64/aarch64.c (revision 259669)
+++ gcc/config/aarch64/aarch64.c (working copy)
@@ -12278,12 +12278,9 @@ aarch64_gimplify_va_arg_expr (tree valis
else
roundup = NULL;
/* Advance ap.__stack */
- t = fold_convert (intDI_type_node, arg);
- t = build2 (PLUS_EXPR, TREE_TYPE (t), t,
- build_int_cst (TREE_TYPE (t), size + 7));
+ t = fold_build_pointer_plus_hwi (arg, size + 7);
t = build2 (BIT_AND_EXPR, TREE_TYPE (t), t,
build_int_cst (TREE_TYPE (t), -8));
- t = fold_convert (TREE_TYPE (arg), t);
t = build2 (MODIFY_EXPR, TREE_TYPE (stack), unshare_expr (stack), t);
/* String up roundup and advance. */
if (roundup)