VRP: don't look through VIEW_CONVERT_EXPRs when registering an edge assertion

Andrew Haley aph@redhat.com
Mon Mar 19 17:09:00 GMT 2007


Forwarding from gcc discussion list http://gcc.gnu.org/ml/gcc/2007-03/msg00691.html

Richard Guenther writes:
 > 
 > It's indeed broken to look through VIEW_CONVERT_EXPRs here.  The patch looks
 > obviously correct.

OK, I'm glad it's obvious.  :-)

Andrew.


2007-03-19  Andrew Haley  <aph@redhat.com>

	* tree-vrp.c (register_edge_assert_for_1): Don't look though
	VIEW_CONVERT_EXPRs.

Index: tree-vrp.c
===================================================================
--- tree-vrp.c	(revision 122839)
+++ tree-vrp.c	(working copy)
@@ -3485,7 +3485,6 @@
     }
   else if (TREE_CODE (rhs) == NOP_EXPR
 	   || TREE_CODE (rhs) == CONVERT_EXPR
-	   || TREE_CODE (rhs) == VIEW_CONVERT_EXPR
 	   || TREE_CODE (rhs) == NON_LVALUE_EXPR)
     { 
       /* Recurse through the type conversion.  */



More information about the Gcc-patches mailing list