This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
obvious.

I am working on adapting any other backends that need adjusting.

Aldy

	PR/30079
	* config/pa/pa.c (hppa_gimplify_va_arg_expr): Build MODIFY_EXPR
	not GIMPLE_MODIFY_STMT.

Index: config/pa/pa.c
===================================================================
--- 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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]