[tuples] Fix GIMPLE_BIND's block

Jakub Jelinek jakub@redhat.com
Fri Jul 4 19:36:00 GMT 2008


Hi!

This patch fixes 59 FAILs on x86_64-linux make check.  gimple_build_bind
was setting the STMT's block rather than gimple_bind_block.
The gimple_copy change is just an optimization - unshare_expr
on a BLOCK is a nop.

Bootstrapped/regtested on x86_64-linux, ok for tuples?

2008-07-04  Jakub Jelinek  <jakub@redhat.com>

	* gimple.c (gimple_build_bind): Set gimple_bind_block rather
	than gimple_block.
	(gimple_copy) <case GIMPLE_BIND>: Don't unshare gimple_bind_block.

--- gcc/gimple.c.jj	2008-07-04 16:49:50.000000000 +0200
+++ gcc/gimple.c	2008-07-04 20:00:44.000000000 +0200
@@ -565,7 +565,8 @@ gimple_build_bind (tree vars, gimple_seq
   gimple_bind_set_vars (p, vars);
   if (body)
     gimple_bind_set_body (p, body);
-  gimple_set_block (p, block);
+  if (block)
+    gimple_bind_set_block (p, block);
   return p;
 }
 
@@ -2084,7 +2085,7 @@ gimple_copy (gimple stmt)
 	  new_seq = gimple_seq_copy (gimple_bind_body (stmt));
 	  gimple_bind_set_body (copy, new_seq);
 	  gimple_bind_set_vars (copy, unshare_expr (gimple_bind_vars (stmt)));
-	  gimple_bind_set_block (copy, unshare_expr (gimple_bind_block (stmt)));
+	  gimple_bind_set_block (copy, gimple_bind_block (stmt));
 	  break;
 
 	case GIMPLE_CATCH:

	Jakub



More information about the Gcc-patches mailing list