diff mbox

[4.4] Fix PR rtl-optimization/46337

Message ID 201011290956.41903.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou Nov. 29, 2010, 8:56 a.m. UTC
This fixes an embarrassing bug in dse.c: arguments passed to gen_int_mode are 
swapped in a couple of places.  This was already fixed on the 4.5 branch 
(then mainline) by Ian; the submitter ran into it on the 4.4 branch as well.

Tested on i586-suse-linux, applied on the 4.4 branch.


2010-11-29  Eric Botcazou  <ebotcazou@adacore.com>

	PR rtl-optimization/46337
	Backport from mainline
	2009-04-20  Ian Lance Taylor  <iant@google.com>

	* dse.c (replace_inc_dec): Reverse parameters to gen_int_mode.
diff mbox

Patch

Index: tree.c
===================================================================
--- tree.c	(revision 167201)
+++ tree.c	(working copy)
@@ -7110,9 +7110,11 @@  build_range_type_1 (tree type, tree lowv
   TYPE_USER_ALIGN (itype) = TYPE_USER_ALIGN (type);
 
   if ((TYPE_MIN_VALUE (itype)
-       && TREE_CODE (TYPE_MIN_VALUE (itype)) != INTEGER_CST)
+       && TREE_CODE (TYPE_MIN_VALUE (itype)) != INTEGER_CST
+       && !CONTAINS_PLACEHOLDER_P (TYPE_MIN_VALUE (itype)))
       || (TYPE_MAX_VALUE (itype)
-	  && TREE_CODE (TYPE_MAX_VALUE (itype)) != INTEGER_CST))
+	  && TREE_CODE (TYPE_MAX_VALUE (itype)) != INTEGER_CST
+	  && !CONTAINS_PLACEHOLDER_P (TYPE_MAX_VALUE (itype))))
     {
       /* Since we cannot reliably merge this type, we need to compare it using
 	 structural equality checks.  */