From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22757 invoked by alias); 26 Mar 2008 17:38:53 -0000 Received: (qmail 22586 invoked by uid 48); 26 Mar 2008 17:38:05 -0000 Date: Wed, 26 Mar 2008 17:38:00 -0000 Message-ID: <20080326173805.22585.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/35430] [4.1/4.2/4.3/4.4 regression] ICE with complex arithmetic 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: 2008-03/txt/msg02085.txt.bz2 ------- Comment #1 from pinskia at gcc dot gnu dot org 2008-03-26 17:38 ------- This is a front-end issue. C++ calls it at: 3952 /* Do not warn if the comparison is an equality operation, 3953 the unsigned quantity is an integral constant and it does 3954 not use the most significant bit of result_type. */ 3955 else if ((resultcode == EQ_EXPR || resultcode == NE_EXPR) 3956 && ((op0_signed && TREE_CODE (orig_op1) == INTEGER_CST 3957 && int_fits_type_p (orig_op1, c_common_signed_type 3958 (result_type))) While C does: 8499 /* Do not warn if the comparison is an equality operation, 8500 the unsigned quantity is an integral constant, and it 8501 would fit in the result if the result were signed. */ 8502 else if (TREE_CODE (uop) == INTEGER_CST 8503 && (resultcode == EQ_EXPR || resultcode == NE_EXPR) 8504 && int_fits_type_p 8505 (uop, c_common_signed_type (result_type))) -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |c http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35430