re PR middle-end/69546 (wrong code with -O and simple int128 arithmetics)
authorJakub Jelinek <jakub@redhat.com>
Sat, 30 Jan 2016 18:04:13 +0000 (19:04 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 30 Jan 2016 18:04:13 +0000 (19:04 +0100)
commitdb7a2818002ba7e0c1863d15aca3212911161267
tree3a978b34d4a749f949ab5c378dd10d65e6b9c5b1
parente520d5f02a0cfa5d07a48a14f2b67af63884e9ed
re PR middle-end/69546 (wrong code with -O and simple int128 arithmetics)

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.

From-SVN: r233012
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr69546-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr69546-2.c [new file with mode: 0644]
gcc/wide-int.cc