Skip to content

Commit

Permalink
libgfortran: implement fpu-ppc for macOS
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Fedorov <vital.had@gmail.com>
  • Loading branch information
barracuda156 committed Jun 5, 2023
1 parent 84d080a commit f8404f3
Show file tree
Hide file tree
Showing 4 changed files with 457 additions and 1 deletion.
9 changes: 9 additions & 0 deletions gcc/testsuite/gfortran.dg/ieee/signaling_2_c.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#ifdef __POWERPC__ // No support for issignaling in math.h on Darwin PPC

int isnansf (float x) { return __builtin_issignaling (x) ? 1 : 0; }
int isnans (double x) { return __builtin_issignaling (x) ? 1 : 0; }
int isnansl (long double x) { return __builtin_issignaling (x) ? 1 : 0; }

#else

#define _GNU_SOURCE
#include <math.h>
#include <float.h>
Expand All @@ -6,3 +14,4 @@ int isnansf (float x) { return issignaling (x) ? 1 : 0; }
int isnans (double x) { return issignaling (x) ? 1 : 0; }
int isnansl (long double x) { return issignaling (x) ? 1 : 0; }

#endif
2 changes: 1 addition & 1 deletion gcc/testsuite/gfortran.dg/round_4.f90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! { dg-do run { xfail i?86-*-freebsd* } }
! { dg-add-options ieee }
! { dg-skip-if "PR libfortran/58015" { hppa*-*-hpux* } }
! { dg-skip-if "IBM long double 31 bits of precision, test requires 38" { powerpc*-*-linux* } }
! { dg-skip-if "IBM long double 31 bits of precision, test requires 38" { powerpc*-*-darwin* powerpc*-*-linux* } }
!
! PR fortran/35862
!
Expand Down

0 comments on commit f8404f3

Please sign in to comment.