| 1 |
/* PR rtl-optimization/87485 */ |
| 2 |
/* { dg-do compile { target int128 } } */ |
| 3 |
/* { dg-options "-O2 -fschedule-insns -fno-guess-branch-probability -fno-isolate-erroneous-paths-dereference -fno-omit-frame-pointer -fno-split-wide-types -fno-tree-ccp -fno-tree-sra" } */ |
| 4 |
/* { dg-additional-options "-fstack-protector-strong" { target fstack_protector } } */ |
| 5 |
/* { dg-require-effective-target scheduling } */ |
| 6 |
|
| 7 |
int *a; |
| 8 |
|
| 9 |
int |
| 10 |
foo (__int128 x, int y, int z) |
| 11 |
{ |
| 12 |
__int128 b; |
| 13 |
*a = ((!!y ? y : x) * y | x) * 2; |
| 14 |
if (z == 0) |
| 15 |
{ |
| 16 |
unsigned int c = 1; |
| 17 |
__int128 *d = &b; |
| 18 |
for (*a = 0; *a < 1; *a += y) |
| 19 |
; |
| 20 |
*a += b < (c / 0); /* { dg-warning "division by zero" } */ |
| 21 |
goto l; |
| 22 |
m: |
| 23 |
while (b < 1) |
| 24 |
; |
| 25 |
++*a; |
| 26 |
} |
| 27 |
goto m; |
| 28 |
l: |
| 29 |
return 0; |
| 30 |
} |