This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/19606] wrong code for arith.expr: (((unsigned int)(signed int) a ) / 2LL) with signed char a=-4
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Feb 2005 23:42:17 -0000
- Subject: [Bug c/19606] wrong code for arith.expr: (((unsigned int)(signed int) a ) / 2LL) with signed char a=-4
- References: <20050124160006.19606.heinrich.brand@fujitsu-siemens.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From steven at gcc dot gnu dot org 2005-02-11 23:42 -------
Ignore comment #4, it's wrong.
An IRC debug session revealed that the call to get_narrower at c-typeck.c:7492
is incorrect; it's not being fed values properly converted to result_type.
A little archaeology shows that the offending code has been there since
forever (ie. it is in old-gcc).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19606