Here's something simpler. Only very lightly tested, but isn't something
like this all that's needed? Could decide whether to apply it to
expr_list etc. as well.
Index: print-rtl.c
===================================================================
--- print-rtl.c (revision 241233)
+++ print-rtl.c (working copy)
@@ -697,7 +697,12 @@ print_rtx (const_rtx in_rtx)
/* Get the format string and skip the first elements if we have handled
them already. */
- for (; idx < GET_RTX_LENGTH (GET_CODE (in_rtx)); idx++)
+ int limit = GET_RTX_LENGTH (GET_CODE (in_rtx));
+ if (flag_compact
+ && INSN_CHAIN_CODE_P (GET_CODE (in_rtx))
+ && XEXP (in_rtx, limit - 1) == NULL_RTX)
+ limit--;
+ for (; idx < limit; idx++)
print_rtx_operand (in_rtx, idx);
switch (GET_CODE (in_rtx))
Bernd