| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target hard_float } */ |
| 3 |
/* { dg-options "-O2 -ftrapping-math -fdump-tree-optimized -fdump-rtl-final" } */ |
| 4 |
/* { dg-final { scan-tree-dump-times {(?n)= \(int\)} 3 "optimized" } } */ |
| 5 |
/* { dg-final { scan-rtl-dump-times {(?n)^(?!.*REG_EQUIV)(?=.*\(fix:SI)} 3 "final" } } */ |
| 6 |
|
| 7 |
int |
| 8 |
foo_ofr () |
| 9 |
{ |
| 10 |
union {float a; |
| 11 |
int b;}c; |
| 12 |
c.b = 0x4f000000; |
| 13 |
return (int)c.a; |
| 14 |
} |
| 15 |
|
| 16 |
int |
| 17 |
foo_inf () |
| 18 |
{ |
| 19 |
union {float a; |
| 20 |
int b;}c; |
| 21 |
c.b = 0xff800000; |
| 22 |
return (int)c.a; |
| 23 |
} |
| 24 |
|
| 25 |
int |
| 26 |
foo_nan () |
| 27 |
{ |
| 28 |
union {float a; |
| 29 |
int b;}c; |
| 30 |
c.b = 0xff800001; |
| 31 |
return (int)c.a; |
| 32 |
} |