[Bug tree-optimization/63302] [4.9 Regression] Code with 64-bit long long constants is miscompiled on 32-bit host
zhenqiang.chen at arm dot com
gcc-bugzilla@gcc.gnu.org
Mon Sep 29 02:19:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63302
--- Comment #13 from Zhenqiang Chen <zhenqiang.chen at arm dot com> ---
For 4.9, some function optimizes the code as:
Optimizing range tests x_2 -[-2147483648, -2147483648] and -[0, 0]
into (x_2 & 2147483647) != 0
For trunk, optimize_range_tests_diff optimizes the code as:
Optimizing range tests x_2 -[-2147483648, -2147483648] and -[0, 0]
into (x_2 + 2147483648 & -2147483649) != 0
I tried to remove need_64bit_hwint=yes" from config.gcc to build i686. But it
does not build. So still need your help to idnetify the root cause.
Can you try to remove the line in tree-ssa-reassoc.c?
any_changes |= optimize_range_tests_1 (opcode, first, length, true,
ops, ranges);
And add a printf at the place:
printf ("changes: %d\n", any_changes);
More information about the Gcc-bugs
mailing list