From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14783 invoked by alias); 18 Jul 2007 14:16:35 -0000 Received: (qmail 14390 invoked by uid 48); 18 Jul 2007 14:16:19 -0000 Date: Wed, 18 Jul 2007 14:16:00 -0000 Message-ID: <20070718141619.14389.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [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 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-07/txt/msg01921.txt.bz2 ------- 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