Yes, that seems to have been the problem. Applying the patch resolves the 50 test failures involving nan and inf.
The few remaining problems seem like they're split between type checker tests and a few where auto bignum conversion might not be working (or at least it looks like certain integer operations are overflowing).
Bill
On Oct 3, 2012, at 3:30 AM, "Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum" 10353@lyskom.lysator.liu.se wrote:
Hm, I wonder if it's the negative array index that breaks it. Could you try this patch:
diff --git a/src/port.h b/src/port.h index 25b7f86..427ebba 100644 --- a/src/port.h +++ b/src/port.h @@ -338,12 +338,12 @@ long long gethrtime(void); #define MAKE_NAN() (nan_.d[-1]) #else #ifdef DOUBLE_IS_IEEE_LITTLE -#define DECLARE_INF static const struct { unsigned char c[8]; double d[1]; } \
- inf_ = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }, { 0.0 } };
-#define DECLARE_NAN static const struct { unsigned char c[8]; double d[1]; } \
- nan_ = { { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }, { 0.0 } };
-#define MAKE_INF(s) ((s)*inf_.d[-1]) -#define MAKE_NAN() (nan_.d[-1]) +#define DECLARE_INF static const union { unsigned char c[8]; double d[1]; } \
- inf_ = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } };
+#define DECLARE_NAN static const union { unsigned char c[8]; double d[1]; } \
- nan_ = { { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f } };
+#define MAKE_INF(s) ((s)*inf_.d[0]) +#define MAKE_NAN() (nan_.d[0]) #else #ifdef FLOAT_IS_IEEE_BIG #define DECLARE_INF static const struct { unsigned char c[4]; float f[1]; } \ @@ -354,12 +354,12 @@ long long gethrtime(void); #define MAKE_NAN() (nan_.f[-1]) #else #ifdef FLOAT_IS_IEEE_LITTLE -#define DECLARE_INF static const struct { unsigned char c[4]; float f[1]; } \
- inf_ = { { 0, 0, 0x80, 0x7f }, { 0.0 } };
-#define DECLARE_NAN static const struct { unsigned char c[4]; float f[1]; } \
- nan_ = { { 0, 0, 0xc0, 0x7f }, { 0.0 } };
-#define MAKE_INF(s) ((s)*inf_.f[-1]) -#define MAKE_NAN() (nan_.f[-1]) +#define DECLARE_INF static const union { unsigned char c[4]; float f[1]; } \
- inf_ = { { 0, 0, 0x80, 0x7f } };
+#define DECLARE_NAN static const union { unsigned char c[4]; float f[1]; } \
- nan_ = { { 0, 0, 0xc0, 0x7f } };
+#define MAKE_INF(s) ((s)*inf_.f[0]) +#define MAKE_NAN() (nan_.f[0]) #else
#define DECLARE_INF