This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/14449] long long & unsigned calculation gives wrong result
- From: "dje at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Mar 2004 03:17:30 -0000
- Subject: [Bug middle-end/14449] long long & unsigned calculation gives wrong result
- References: <20040305161431.14449.joerg.richter@pdv-fs.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dje at gcc dot gnu dot org 2004-03-07 03:17 -------
Using -mcpu=powerpc produces the correct result. The problem appears to be a
bug in expr.c:expand_expr_real() for MULT_EXPR case when umul_widen_optab does
not exist and smul_widen_optab does exist. For the example, umulsidi3 does not
exist for POWER and common mode, so mulsidi3 is chosen, but the result is not
adjusted correctly (not adjusted at all) to account for unsigned..
--
What |Removed |Added
----------------------------------------------------------------------------
Component|target |middle-end
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14449