[Bug middle-end/19606] wrong code for arith.expr: (((unsigned int)(signed int) a ) / 2LL) with signed char a=-4

steven at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Feb 12 11:13:00 GMT 2005

------- 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 
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... 



More information about the Gcc-bugs mailing list