diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2012-08-12 18:20:41 +0200 |
---|---|---|
committer | Marc Glisse <glisse@gcc.gnu.org> | 2012-08-12 16:20:41 +0000 |
commit | 874a3756f295f5373e66fd07841096a5f17b5651 (patch) | |
tree | 4ca53bb2e362a9e565642a0de31b1135476a9800 | |
parent | 0885e9500dbe5ed34225004b0b4a051889f58ad0 (diff) | |
download | gcc-874a3756f295f5373e66fd07841096a5f17b5651.zip gcc-874a3756f295f5373e66fd07841096a5f17b5651.tar.gz gcc-874a3756f295f5373e66fd07841096a5f17b5651.tar.bz2 |
re PR middle-end/54193 (dump_gimple_assign raw can't handle 4 operands)
2012-08-12 Marc Glisse <marc.glisse@inria.fr>
PR middle-end/54193
* gimple-pretty-print.c (dump_ternary_rhs): Handle 4 arguments.
From-SVN: r190328
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/gimple-pretty-print.c | 26 |
2 files changed, 22 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0fd7f72..0d411c7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-08-12 Marc Glisse <marc.glisse@inria.fr> + + PR middle-end/54193 + * gimple-pretty-print.c (dump_ternary_rhs): Handle 4 arguments. + 2012-08-12 Oleg Endo <olegendo@gcc.gnu.org> PR target/39423 diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c index af7c39a..ccf995c 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 { |