From 874a3756f295f5373e66fd07841096a5f17b5651 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Sun, 12 Aug 2012 18:20:41 +0200 Subject: [PATCH] re PR middle-end/54193 (dump_gimple_assign raw can't handle 4 operands) 2012-08-12 Marc Glisse PR middle-end/54193 * gimple-pretty-print.c (dump_ternary_rhs): Handle 4 arguments. From-SVN: r190328 --- gcc/ChangeLog | 5 +++++ gcc/gimple-pretty-print.c | 26 +++++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0fd7f72ae6d..0d411c71b43 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-08-12 Marc Glisse + + PR middle-end/54193 + * gimple-pretty-print.c (dump_ternary_rhs): Handle 4 arguments. + 2012-08-12 Oleg Endo PR target/39423 diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c index af7c39a2778..ccf995c4a5d 100644 --- a/gcc/gimple-pretty-print.c +++ b/gcc/gimple-pretty-print.c @@ -477,17 +477,25 @@ dump_gimple_assign (pretty_printer *buffer, gimple gs, int spc, int flags) { if (flags & TDF_RAW) { - tree last; - if (gimple_num_ops (gs) == 2) - last = NULL_TREE; - else if (gimple_num_ops (gs) == 3) - last = gimple_assign_rhs2 (gs); - else - gcc_unreachable (); + tree arg1 = NULL; + tree arg2 = NULL; + tree arg3 = NULL; + switch (gimple_num_ops (gs)) + { + case 4: + arg3 = gimple_assign_rhs3 (gs); + case 3: + arg2 = gimple_assign_rhs2 (gs); + case 2: + arg1 = gimple_assign_rhs1 (gs); + break; + default: + gcc_unreachable (); + } - dump_gimple_fmt (buffer, spc, flags, "%G <%s, %T, %T, %T>", gs, + dump_gimple_fmt (buffer, spc, flags, "%G <%s, %T, %T, %T, %T>", gs, tree_code_name[gimple_assign_rhs_code (gs)], - gimple_assign_lhs (gs), gimple_assign_rhs1 (gs), last); + gimple_assign_lhs (gs), arg1, arg2, arg3); } else { -- 2.30.2