This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/81423] [6/7 Regression] Wrong code at -O2
- From: "babokin at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 14 Oct 2017 08:27:47 +0000
- Subject: [Bug rtl-optimization/81423] [6/7 Regression] Wrong code at -O2
- Auto-submitted: auto-generated
- References: <bug-81423-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81423
--- Comment #16 from Dmitry Babokin <babokin at gmail dot com> ---
ll = -5597998501375493990LL;
// result is 2595916314 here.
ll = unsigned(5677365550390624949L - ll) - (ull1 > 0);
So:
// t1 is 466811183
unsigned long long int t1 = ll + -2129105131L;
// t2 is 10280750143997242019
unsigned long long int t2 = t1 ^ 10280750144413668236ULL;
// t3 is 10
unsigned long long int t3 = t2 - 10280750143997242009ULL;
So the test case looks correct to me.
UBSAN also doesn't complain.