[Bug c/32796] [4.3 Regression] internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Jul 18 14:16:00 GMT 2007
------- Comment #5 from pinskia at gcc dot gnu dot org 2007-07-18 14:16 -------
Patch which needs testing:
Index: c-typeck.c
===================================================================
--- c-typeck.c (revision 126719)
+++ c-typeck.c (working copy)
@@ -8218,8 +8239,9 @@
< TYPE_PRECISION (result_type))
&& (type
= c_common_signed_or_unsigned_type (unsigned1,
- TREE_TYPE (arg1)),
- int_fits_type_p (arg0, type)))
+ TREE_TYPE (arg1)))
+ && !POINTER_TYPE_P (type)
+ && int_fits_type_p (arg0, type))
result_type = type;
else if (TREE_CODE (arg1) == INTEGER_CST
&& (unsigned0 || !uns)
@@ -8227,8 +8249,9 @@
< TYPE_PRECISION (result_type))
&& (type
= c_common_signed_or_unsigned_type (unsigned0,
- TREE_TYPE (arg0)),
- int_fits_type_p (arg1, type)))
+ TREE_TYPE (arg0)))
+ && !POINTER_TYPE_P (type)
+ && int_fits_type_p (arg0, type))
result_type = type;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32796
More information about the Gcc-bugs
mailing list