diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr119532.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr119532.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr119532.c b/gcc/testsuite/gcc.dg/torture/pr119532.c new file mode 100644 index 0000000..bba2e45 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr119532.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target fixed_point } */ + +extern _Fract sinuhk_deg (unsigned short _Accum); + +_Fract cosuhk_deg (unsigned short _Accum deg) +{ + unsigned short _Accum _90_deg = 90uhk; + __asm ("" : "+r" (_90_deg)); + + return deg <= _90_deg + ? sinuhk_deg (_90_deg - deg) + : -sinuhk_deg (deg - _90_deg); +} |