[Bug middle-end/26630] [4.0 Regression] Incorrect result when subtracting, casting to short and back to int, adding and multiplying
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Mar 10 13:53:00 GMT 2006
------- Comment #3 from rguenth at gcc dot gnu dot org 2006-03-10 13:53 -------
shorter testcase:
extern void abort(void);
int main()
{
int a1 = 40000;
int c1 = ( ((int)(short)(a1-10000)) + 10000)*2;
if (c1 != 80000)
abort();
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26630
More information about the Gcc-bugs
mailing list