This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/16443] [3.5 Regression] ICE during linux kernel compilation


------- Additional Comments From ehrhardt at mathematik dot uni-ulm dot de  2004-07-13 15:16 -------
Hi,

the following part from the patch identified by Volker looks
very suspicious:

+		EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i,
+		    {
+		      tree var = referenced_var (i);
+		      add_stmt_operand (&var, stmt, opf_is_def, prev_vops);
+		    });

We're passing the address of a local var down to add_stmt_operand.
add_stmt_operand will add this _address_, i.e. &var to the statement
operands. This is bound to fail as soon as we leave the scope of var.

The following might be a temporary solution:

Index: tree-ssa-operands.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/tree-ssa-operands.c,v
retrieving revision 2.15
diff -u -r2.15 tree-ssa-operands.c
--- tree-ssa-operands.c	8 Jul 2004 15:03:10 -0000	2.15
+++ tree-ssa-operands.c	13 Jul 2004 15:08:53 -0000
@@ -1229,36 +1229,7 @@
   for (link = ASM_CLOBBERS (stmt); link; link = TREE_CHAIN (link))
     if (strcmp (TREE_STRING_POINTER (TREE_VALUE (link)), "memory") == 0)
       {
-	size_t i;
-
-	/* If we still have not computed aliasing information, we
-	   won't know what variables are call-clobbered and/or
-	   addressable.  Just mark the statement as having volatile
-	   operands for now.  */
-	if (!aliases_computed_p)
-	  {
-	    stmt_ann (stmt)->has_volatile_ops = true;
-	    break;
-	  }
-
-	/* Clobber all call-clobbered variables (or .GLOBAL_VAR if we
-	   decided to group them).  */
-	if (global_var)
-	  add_stmt_operand (&global_var, stmt, opf_is_def, prev_vops);
-	else
-	  EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i,
-	      {
-		tree var = referenced_var (i);
-		add_stmt_operand (&var, stmt, opf_is_def, prev_vops);
-	      });
-
-	/* Now clobber all addressables.  */
-	EXECUTE_IF_SET_IN_BITMAP (addressable_vars, 0, i,
-	    {
-	      tree var = referenced_var (i);
-	      add_stmt_operand (&var, stmt, opf_is_def, prev_vops);
-	    });
-
+	stmt_ann (stmt)->has_volatile_ops = true;
 	break;
       }
 }


     regards   Christian



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16443


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]