This is the mail archive of the
mailing list for the GCC project.
patch: PR30079 gimplify_va_* should not create tuples
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: dave dot anglin at nrc dot ca, gcc-patches at gcc dot gnu dot org
- Cc: dnovillo at redhat dot com, jason at redhat dot com
- Date: Wed, 6 Dec 2006 18:07:20 -0400
- Subject: patch: PR30079 gimplify_va_* should not create tuples
It turns out the changes to the back ends were wrong.
Jason tells me that despite their deceiving names, the gimplify*_va_* hooks do
not expect gimple to be returned, and still iterate their results to the
gimplifier. So to keep the middle-end happy (and fold() in the PA's case), we
should just leave the MODIFY_EXPRs and the gimplifier will take care of things.
The following patch fixes your problem. I am committing to mainline as
I am working on adapting any other backends that need adjusting.
* config/pa/pa.c (hppa_gimplify_va_arg_expr): Build MODIFY_EXPR
--- config/pa/pa.c (revision 119546)
+++ config/pa/pa.c (working copy)
@@ -5891,7 +5891,7 @@ hppa_gimplify_va_arg_expr (tree valist,
u = build_int_cst (valist_type, (size > 4 ? -8 : -4));
t = build2 (BIT_AND_EXPR, valist_type, t, u);
- t = build2 (GIMPLE_MODIFY_STMT, valist_type, valist, t);
+ t = build2 (MODIFY_EXPR, valist_type, valist, t);
ofs = (8 - size) % 4;
if (ofs != 0)