]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/34679 (ICE: tree check: expected integer_type, have enumeral_...
authorRichard Guenther <rguenther@suse.de>
Wed, 9 Jan 2008 12:14:01 +0000 (12:14 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 9 Jan 2008 12:14:01 +0000 (12:14 +0000)
2008-01-09  Richard Guenther  <rguenther@suse.de>

PR middle-end/34679
* tree.c (host_integerp): Check for sizetype only if the
type is an integer type.

From-SVN: r131425

gcc/ChangeLog
gcc/tree.c

index b1fca9bf7776a80c35314e6b1b04430c87bfdcd5..f4ff71b28159b32d1fbba200a8ba7b60d2b6e3fe 100644 (file)
@@ -1,3 +1,9 @@
+2008-01-09  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/34679
+       * tree.c (host_integerp): Check for sizetype only if the
+       type is an integer type.
+
 2008-01-09  Steven Bosscher  <stevenb.gcc@gmail.com>
 
        PR debug/26364
index d52f7c658688795b5800a439ff178a71585a6135..02570b78c1a3be69b50f7c0bfebc80c8987b141b 100644 (file)
@@ -4946,7 +4946,8 @@ host_integerp (const_tree t, int pos)
              || (! pos && TREE_INT_CST_HIGH (t) == -1
                  && (HOST_WIDE_INT) TREE_INT_CST_LOW (t) < 0
                  && (!TYPE_UNSIGNED (TREE_TYPE (t))
-                     || TYPE_IS_SIZETYPE (TREE_TYPE (t))))
+                     || (TREE_CODE (TREE_TYPE (t)) == INTEGER_TYPE
+                         && TYPE_IS_SIZETYPE (TREE_TYPE (t)))))
              || (pos && TREE_INT_CST_HIGH (t) == 0)));
 }