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
This commit is contained in:
Marc Glisse 2012-08-12 18:20:41 +02:00 committed by Marc Glisse
parent 0885e9500d
commit 874a3756f2
2 changed files with 22 additions and 9 deletions

View File

@ -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

View File

@ -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
{