------- Comment #15 from howarth at nitro dot med dot uc dot edu 2006-11-01 04:33 ------- I have pinned down the problem. On Darwin PPC with Xcode 2.4, at -O1 or higher we have problems with the isfinite() macro from libgfortran.h. For the nan_inf_fmt testcase it should always return 0, but it doesn't at -O1 or higher. I think we are seeing the same glitch that was fixed in python for gcc 4.2. The current macro looks like...
#if !defined(isfinite) #if !defined(fpclassify) #define isfinite(x) ((x) - (x) == 0) #else #define isfinite(x) (fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE) #endif /* !defined(fpclassify) */ #endif /* !defined(isfinite) */ I think it we need to cast both x variables in the macro to unsigned long. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29302