This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/69546] [5 Regression] wrong code with -O and simple int128 arithmetics
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 10 Feb 2016 18:44:39 +0000
- Subject: [Bug middle-end/69546] [5 Regression] wrong code with -O and simple int128 arithmetics
- Auto-submitted: auto-generated
- References: <bug-69546-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69546
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Feb 10 18:44:07 2016
New Revision: 233300
URL: https://gcc.gnu.org/viewcvs?rev=233300&root=gcc&view=rev
Log:
Backported from mainline
2016-01-30 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/69546
* wide-int.cc (wi::divmod_internal): For unsigned division
where both operands fit into uhwi, if o1 is 1 and o0 has
msb set, if divident_prec is larger than bits per hwi,
clear another quotient word and return 2 instead of 1.
Similarly for remainder with msb in HWI set, if dividend_prec
is larger than bits per hwi.
* gcc.dg/torture/pr69546.c: New test.
Added:
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr69546-1.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr69546-2.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/wide-int.cc