From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 308 invoked by alias); 11 Feb 2005 22:40:46 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 32702 invoked by uid 48); 11 Feb 2005 22:40:36 -0000 Date: Sat, 12 Feb 2005 11:13:00 -0000 Message-ID: <20050211224036.32701.qmail@sourceware.org> From: "steven at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050124160006.19606.heinrich.brand@fujitsu-siemens.com> References: <20050124160006.19606.heinrich.brand@fujitsu-siemens.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/19606] wrong code for arith.expr: (((unsigned int)(signed int) a ) / 2LL) with signed char a=-4 X-Bugzilla-Reason: CC X-SW-Source: 2005-02/txt/msg01124.txt.bz2 List-Id: ------- Additional Comments From steven at gcc dot gnu dot org 2005-02-11 22:40 ------- Fails on i686 and on AMD64 also. And with both gcc and g++... In c_finish_return, retval is "(long long int) (a / 2)". That is already wrong. In parser_build_binary_op we build TRUNC_DIV_EXPR <(unsigned int) a, 2LL>, which is also already wrong (lost the "signed int" cast). And so we dig deeper into the parser... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19606