This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/63302] [4.9 Regression] Code with 64-bit long long constants is miscompiled on 32-bit host
- From: "zhenqiang.chen at arm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 29 Sep 2014 02:19:43 +0000
- Subject: [Bug tree-optimization/63302] [4.9 Regression] Code with 64-bit long long constants is miscompiled on 32-bit host
- Auto-submitted: auto-generated
- References: <bug-63302-4 at http dot gcc dot gnu dot org/bugzilla/>
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);