This is the mail archive of the gcc-patches@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]

Re: [PATCH] Disallow COMPOUND_EXPR in set_rhs


On Thu, Sep 23, 2004 at 11:13:49AM -0400, Jakub Jelinek wrote:
> At least COMPOUND_EXPR which fold_builtin will return in several occassions,
> e.g. when optimizing sprintf (x, "%s", "string").
> I saw an ICE today where tree-ssa-dom.c (optimize_stmt) called fold_stmt
> and created non-gimple statement.

Argh, of course I mailed wrong patch, sorry.

2004-09-23  Jakub Jelinek  <jakub@redhat.com>

	* tree-ssa-propagate.c (set_rhs): Fail if EXPR is COMPOUND_EXPR.

--- gcc/tree-ssa-propagate.c.jj	2004-09-18 13:49:35.000000000 +0200
+++ gcc/tree-ssa-propagate.c	2004-09-23 17:02:41.483400229 +0200
@@ -575,6 +575,8 @@ set_rhs (tree *stmt_p, tree expr)
       if (!is_gimple_val (TREE_OPERAND (expr, 0)))
 	return false;
     }
+  else if (code == COMPOUND_EXPR)
+    return false;
 
   switch (TREE_CODE (stmt))
     {


	Jakub


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