re PR target/71554 (Miscompilation of __builtin_mul_overflow on i686)
PR target/71554 * gcc.c-torture/execute/pr71554.c: New test. From-SVN: r237512
This commit is contained in:
parent
36d3d5d3db
commit
c577adb24f
@ -4,6 +4,7 @@
|
||||
|
||||
2016-06-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/71554
|
||||
* config/i386/i386.md (setcc + movzbl peephole2): Use reg_set_p.
|
||||
(setcc + and peephole2): Likewise.
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
2016-06-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/71554
|
||||
* gcc.c-torture/execute/pr71554.c: New test.
|
||||
|
||||
PR rtl-optimization/71532
|
||||
* gcc.dg/torture/pr71532.c: New test.
|
||||
|
||||
|
28
gcc/testsuite/gcc.c-torture/execute/pr71554.c
Normal file
28
gcc/testsuite/gcc.c-torture/execute/pr71554.c
Normal file
@ -0,0 +1,28 @@
|
||||
/* PR target/71554 */
|
||||
|
||||
int v;
|
||||
|
||||
__attribute__ ((noinline, noclone)) void
|
||||
bar (void)
|
||||
{
|
||||
v++;
|
||||
}
|
||||
|
||||
__attribute__ ((noinline, noclone))
|
||||
void
|
||||
foo (unsigned int x)
|
||||
{
|
||||
signed int y = ((-__INT_MAX__ - 1) / 2);
|
||||
signed int r;
|
||||
if (__builtin_mul_overflow (x, y, &r))
|
||||
bar ();
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
foo (2);
|
||||
if (v)
|
||||
__builtin_abort ();
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user