This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[3.4] Fixinc tweaks for Solaris 10
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: gcc-patches at gcc dot gnu dot org,bkorb at gnu dot org,"Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Sun, 22 May 2005 08:59:29 +0200
- Subject: [3.4] Fixinc tweaks for Solaris 10
Hi Gaby,
The 3.4.x compiler lacks tweaks that have been added to the 4.x compiler in
order to cope with the new Solaris 10 system headers; in particular, Python
doesn't compile (PR target/19933). So I'd like to backport these tweaks to
the 3.4 branch which, in exactly 2 cases, means tweaking them a bit too. :-)
Bootstrapped/regtested on sparc-sun-solaris2.10. The signbit tweak is
guarded with #ifdef __sparc__ because of endianness considerations, as I don't
have access to i386-pc-solaris2.10. CodeSourcery folks might want to add the
missing bits though. OK for 3.4 branch?
2005-05-22 Eric Botcazou <ebotcazou@libertysurf.fr>
* fixinc/inclhack.def (solaris_math_6_1): New fix.
(solaris_math_9): Rewrite and guard with #ifdef __sparc__.
* fixinc/fixincl.x: Regenerate.
* fixinc/tests/base/iso/math_c99.h: Adjust for above changes.
Backport from mainline:
2005-05-19 Eric Botcazou <ebotcazou@libertysurf.fr>
Joseph S. Myers <joseph@codesourcery.com>
PR target/19933
* fixinc/inclhack.def: New fixes solaris_math_[1-9].
* fixinc/fixincl.x: Regenerate.
* fixinc/tests/base/iso/math_c99.h: New.
Backport from mainline:
2005-05-10 Joseph S. Myers <joseph@codesourcery.com>
* fixinc/inclhack.def (stdio_stdarg_h, stdio_va_list): Bypass on
*-*-solaris2.1[0-9]*, not just *-*-solaris2.1[0-9].
* fixinc/fixincl.x: Regenerate.
Backport from mainline:
2004-11-26 Mark Mitchell <mark@codesourcery.com>
* fixinc/inclhack.def (gnu_types): Do not use on Solaris 2.1x.
(stdio_va_list): Likewise.
(stdio_stdarg.h): Likewise.
(solaris_stdio_tag): Add bypass.
* fixinc/fixincl.x: Regenerated.
2005-05-22 Eric Botcazou <ebotcazou@libertysurf.fr>
????????* gcc.dg/c99-math.h: New
????????* gcc.dg/c99-math-float-1.c: New test.
????????* gcc.dg/c99-math-double-1.c: Likewise.
????????* gcc.dg/c99-math-long-double-1.c: Likewise.
--
Eric Botcazou
Index: inclhack.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/Attic/inclhack.def,v
retrieving revision 1.190.4.10
diff -u -r1.190.4.10 inclhack.def
--- inclhack.def 6 May 2005 16:30:20 -0000 1.190.4.10
+++ inclhack.def 21 May 2005 15:09:43 -0000
@@ -1144,6 +1144,9 @@
bypass = '_GCC_(PTRDIFF|SIZE|WCHAR)_T';
select = "^[ \t]*typedef[ \t]+.*[ \t](ptrdiff|size|wchar)_t;";
c_fix = gnu_type;
+ /* The Solaris 10 headers already define these types correctly. */
+ mach = '*-*-solaris2.1[0-9]*';
+ not_machine = true;
test_text = "typedef long int ptrdiff_t; /* long int */\n"
"typedef uint_t size_t; /* uint_t */\n"
@@ -2528,6 +2531,200 @@
test_text = "extern int utime(const char *, struct utimbuf *);";
};
+/*
+ * Sun Solaris 10 defines several C99 math macros in terms of
+ * builtins specific to the Studio compiler, in particular not
+ * compatible with the GNU compiler.
+ */
+fix = {
+ hackname = solaris_math_1;
+ select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ bypass = "__GNUC__";
+ files = iso/math_c99.h;
+ c_fix = format;
+ c_fix_arg = "#define\tHUGE_VA%1\t(__builtin_huge_va%2())";
+ c_fix_arg = "^#define[ \t]+HUGE_VA([LF]+)[ \t]+__builtin_huge_va([lf]+)";
+ test_text =
+ '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
+ "#undef HUGE_VAL\n"
+ "#define HUGE_VAL __builtin_huge_val\n"
+ "#undef HUGE_VALF\n"
+ "#define HUGE_VALF __builtin_huge_valf\n"
+ "#undef HUGE_VALL\n"
+ "#define HUGE_VALL __builtin_huge_vall";
+};
+
+fix = {
+ hackname = solaris_math_2;
+ select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ bypass = "__GNUC__";
+ files = iso/math_c99.h;
+ c_fix = format;
+ c_fix_arg = "#define\tINFINITY\t(__builtin_inff())";
+ c_fix_arg = "^#define[ \t]+INFINITY[ \t]+__builtin_infinity";
+ test_text =
+ '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
+ "#undef INFINITY\n"
+ "#define INFINITY __builtin_infinity";
+};
+
+fix = {
+ hackname = solaris_math_3;
+ select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ bypass = "__GNUC__";
+ files = iso/math_c99.h;
+ c_fix = format;
+ c_fix_arg = "#define\tNAN\t\t(__builtin_nanf(\"\"))";
+ c_fix_arg = "^#define[ \t]+NAN[ \t]+__builtin_nan";
+ test_text =
+ '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
+ "#undef NAN\n"
+ "#define NAN __builtin_nan";
+};
+
+fix = {
+ hackname = solaris_math_4;
+ select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ bypass = "__GNUC__";
+ files = iso/math_c99.h;
+ c_fix = format;
+ c_fix_arg = "#define\tfpclassify(x) \\\n"
+ " __extension__ ({ __typeof(x) __x_fp = (x); \\\n"
+ "\t\t isnan(__x_fp) \\\n"
+ "\t\t ? FP_NAN \\\n"
+ "\t\t : isinf(__x_fp) \\\n"
+ "\t\t ? FP_INFINITE \\\n"
+ "\t\t : isnormal(__x_fp) \\\n"
+ "\t\t\t ? FP_NORMAL \\\n"
+ "\t\t\t : __x_fp == 0.0 \\\n"
+ "\t\t\t ? FP_ZERO \\\n"
+ "\t\t\t : FP_SUBNORMAL; })";
+ c_fix_arg = "^#define[ \t]+fpclassify\\(x\\)[ \t]+__builtin_fpclassify\\(x\\)";
+ test_text =
+ '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
+ "#undef fpclassify\n"
+ "#define fpclassify(x) __builtin_fpclassify(x)";
+};
+
+fix = {
+ hackname = solaris_math_5;
+ select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ bypass = "__GNUC__";
+ files = iso/math_c99.h;
+ c_fix = format;
+ c_fix_arg = "#define\tisfinite(x) \\\n"
+ " __extension__ ({ __typeof (x) __x_f = (x); \\\n"
+ "\t\t __builtin_expect(!isnan(__x_f - __x_f), 1); })";
+ c_fix_arg = "^#define[ \t]+isfinite\\(x\\)[ \t]+__builtin_isfinite\\(x\\)";
+ test_text =
+ '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
+ "#undef isfinite\n"
+ "#define isfinite(x) __builtin_isfinite(x)";
+};
+
+fix = {
+ hackname = solaris_math_6;
+ select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ bypass = "__GNUC__";
+ files = iso/math_c99.h;
+ c_fix = format;
+ c_fix_arg = "#define\tisinf(x) \\\n"
+ " __extension__ ({ __typeof (x) __x_i = (x); \\\n"
+ "\t\t __builtin_expect(!isnan(__x_i) && !isfinite(__x_i), 0); })";
+ c_fix_arg = "^#define[ \t]+isinf\\(x\\)[ \t]+__builtin_isinf\\(x\\)";
+ test_text =
+ '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
+ "#undef isinf\n"
+ "#define isinf(x) __builtin_isinf(x)";
+};
+
+fix = {
+ hackname = solaris_math_6_1;
+ select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ bypass = "__GNUC__";
+ files = iso/math_c99.h;
+ c_fix = format;
+ c_fix_arg = "#define\tisnan(x) \\\n"
+ " __extension__ ({ __typeof (x) __x_a = (x); \\\n"
+ "\t\t __builtin_expect(__x_a != __x_a, 0); })";
+ c_fix_arg = "^#define[ \t]+isnan\\(x\\)[ \t]+__builtin_isnan\\(x\\)";
+ test_text =
+ '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
+ "#undef isnan\n"
+ "#define isnan(x) __builtin_isnan(x)";
+};
+
+fix = {
+ hackname = solaris_math_7;
+ select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ bypass = "__GNUC__";
+ files = iso/math_c99.h;
+ c_fix = format;
+ c_fix_arg = "#define\tisnormal(x) \\\n"
+ " __extension__ ({ __typeof(x) __x_n = (x); \\\n"
+ "\t\t if (__x_n < 0.0) __x_n = -__x_n; \\\n"
+ "\t\t __builtin_expect(isfinite(__x_n) \\\n"
+ "\t\t\t\t && (sizeof(__x_n) == sizeof(float) \\\n"
+ "\t\t\t\t\t ? __x_n >= __FLT_MIN__ \\\n"
+ "\t\t\t\t\t : sizeof(__x_n) == sizeof(long double) \\\n"
+ "\t\t\t\t\t ? __x_n >= __LDBL_MIN__ \\\n"
+ "\t\t\t\t\t : __x_n >= __DBL_MIN__), 1); })";
+ c_fix_arg = "^#define[ \t]+isnormal\\(x\\)[ \t]+__builtin_isnormal\\(x\\)";
+ test_text =
+ '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
+ "#undef isnormal\n"
+ "#define isnormal(x) __builtin_isnormal(x)";
+};
+
+fix = {
+ hackname = solaris_math_8;
+ select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ bypass = "__GNUC__";
+ files = iso/math_c99.h;
+ c_fix = format;
+ c_fix_arg = "#ifdef __sparc__\n"
+ "#undef\tsignbit\n"
+ "#define\tsignbit(x) \\\n"
+ " (sizeof(x) == sizeof(float) \\\n"
+ " ? ({ union { float f; unsigned int i[1]; } __s; \\\n"
+ "\t__s.f = (x); __s.i[0] >> 31; }) \\\n"
+ " : sizeof(x) == sizeof(long double) \\\n"
+ " ? ({ union { long double f; unsigned int i[4]; } __s; \\\n"
+ "\t __s.f = (x); __s.i[0] >> 31; }) \\\n"
+ " : ({ union { double f; unsigned int i[2]; } __s; \\\n"
+ "\t __s.f = (x); __s.i[0] >> 31; }))\n"
+ "#endif /* __sparc__ */\n";
+ c_fix_arg = "^#undef[ \t]signbit\n"
+ "^#define[ \t]+signbit\\(x\\)[ \t]+__builtin_signbit\\(x\\)";
+ test_text =
+ '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
+ "#undef signbit\n"
+ "#define signbit(x) __builtin_signbit(x)";
+};
+
+fix = {
+ hackname = solaris_math_9;
+ select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
+ bypass = "__GNUC__";
+ files = iso/math_c99.h;
+ c_fix = format;
+ c_fix_arg = "#define\t%1(x, y)%2__builtin_%1(x, y)";
+ c_fix_arg = "^#define[ \t]+([a-z]+)\\(x, y\\)([ \t]+)\\(\\(x\\) __builtin_[a-z]+\\(y\\)\\)";
+ test_text =
+ '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
+ "#undef isgreater\n"
+ "#define isgreater(x, y) ((x) __builtin_isgreater(y))\n"
+ "#undef isgreaterequal\n"
+ "#define isgreaterequal(x, y) ((x) __builtin_isgreaterequal(y))\n"
+ "#undef isless\n"
+ "#define isless(x, y) ((x) __builtin_isless(y))\n"
+ "#undef islessequal\n"
+ "#define islessequal(x, y) ((x) __builtin_islessequal(y))\n"
+ "#undef islessgreater\n"
+ "#define islessgreater(x, y) ((x) __builtin_islessgreater(y))\n"
+ "#undef isunordered\n"
+ "#define isunordered(x, y) ((x) __builtin_isunordered(y))";
+};
/*
* Sun Solaris 2.5.1, 2.6 defines PTHREAD_{MUTEX|COND}_INITIALIZER
@@ -2607,6 +2804,9 @@
files = stdio_tag.h;
select = '__cplusplus < 54321L';
+ /* In Solaris 10, the code in stdio_tag.h is conditionalized on
+ "!defined(__GNUC__)" so we no longer need to fix it. */
+ bypass = '__GNUC__';
sed = 's/defined(__cplusplus) && (__cplusplus < 54321L)/0/';
test_text = "#if\tdefined(__cplusplus) && (__cplusplus < 54321L)";
@@ -2672,6 +2872,12 @@
hackname = stdio_stdarg_h;
files = stdio.h;
bypass = "include.*(stdarg\.h|machine/ansi\.h)";
+ /*
+ * On Solaris 10, this fix is unnecessary; <stdio.h> includes
+ * <iso/stdio_iso.h>, which includes <sys/va_list.h>.
+ */
+ mach = '*-*-solaris2.1[0-9]*';
+ not_machine = true;
c_fix = wrap;
@@ -2698,6 +2904,13 @@
files = internal/stdio_core.h;
files = internal/wchar_core.h;
bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list';
+ /*
+ * On Solaris 10, the definition in
+ * <stdio.h> is guarded appropriately by the _XPG4 feature macro;
+ * there is therefore no need for this fix there.
+ */
+ mach = '*-*-solaris2.1[0-9]*';
+ not_machine = true;
/*
* Use __gnuc_va_list in arg types in place of va_list.
--- /dev/null 2005-05-11 10:11:50.000000000 +0200
+++ tests/base/iso/math_c99.h 2005-05-21 17:07:26.000000000 +0200
@@ -0,0 +1,128 @@
+/* DO NOT EDIT THIS FILE.
+
+ It has been auto-edited by fixincludes from:
+
+ "fixinc/tests/inc/iso/math_c99.h"
+
+ This had to be done to correct non-standard usages in the
+ original, manufacturer supplied header file. */
+
+
+
+#if defined( SOLARIS_MATH_1_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef HUGE_VAL
+#define HUGE_VAL (__builtin_huge_val())
+#undef HUGE_VALF
+#define HUGE_VALF (__builtin_huge_valf())
+#undef HUGE_VALL
+#define HUGE_VALL (__builtin_huge_vall())
+#endif /* SOLARIS_MATH_1_CHECK */
+
+
+#if defined( SOLARIS_MATH_2_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef INFINITY
+#define INFINITY (__builtin_inff())
+#endif /* SOLARIS_MATH_2_CHECK */
+
+
+#if defined( SOLARIS_MATH_3_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef NAN
+#define NAN (__builtin_nanf(""))
+#endif /* SOLARIS_MATH_3_CHECK */
+
+
+#if defined( SOLARIS_MATH_4_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef fpclassify
+#define fpclassify(x) \
+ __extension__ ({ __typeof(x) __x_fp = (x); \
+ isnan(__x_fp) \
+ ? FP_NAN \
+ : isinf(__x_fp) \
+ ? FP_INFINITE \
+ : isnormal(__x_fp) \
+ ? FP_NORMAL \
+ : __x_fp == 0.0 \
+ ? FP_ZERO \
+ : FP_SUBNORMAL; })
+#endif /* SOLARIS_MATH_4_CHECK */
+
+
+#if defined( SOLARIS_MATH_5_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef isfinite
+#define isfinite(x) \
+ __extension__ ({ __typeof (x) __x_f = (x); \
+ __builtin_expect(!isnan(__x_f - __x_f), 1); })
+#endif /* SOLARIS_MATH_5_CHECK */
+
+
+#if defined( SOLARIS_MATH_6_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef isinf
+#define isinf(x) \
+ __extension__ ({ __typeof (x) __x_i = (x); \
+ __builtin_expect(!isnan(__x_i) && !isfinite(__x_i), 0); })
+#endif /* SOLARIS_MATH_6_CHECK */
+
+
+#if defined( SOLARIS_MATH_6_1_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef isnan
+#define isnan(x) \
+ __extension__ ({ __typeof (x) __x_a = (x); \
+ __builtin_expect(__x_a != __x_a, 0); })
+#endif /* SOLARIS_MATH_6_1_CHECK */
+
+
+#if defined( SOLARIS_MATH_7_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef isnormal
+#define isnormal(x) \
+ __extension__ ({ __typeof(x) __x_n = (x); \
+ if (__x_n < 0.0) __x_n = -__x_n; \
+ __builtin_expect(isfinite(__x_n) \
+ && (sizeof(__x_n) == sizeof(float) \
+ ? __x_n >= __FLT_MIN__ \
+ : sizeof(__x_n) == sizeof(long double) \
+ ? __x_n >= __LDBL_MIN__ \
+ : __x_n >= __DBL_MIN__), 1); })
+#endif /* SOLARIS_MATH_7_CHECK */
+
+
+#if defined( SOLARIS_MATH_8_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#ifdef __sparc__
+#undef signbit
+#define signbit(x) \
+ (sizeof(x) == sizeof(float) \
+ ? ({ union { float f; unsigned int i[1]; } __s; \
+ __s.f = (x); __s.i[0] >> 31; }) \
+ : sizeof(x) == sizeof(long double) \
+ ? ({ union { long double f; unsigned int i[4]; } __s; \
+ __s.f = (x); __s.i[0] >> 31; }) \
+ : ({ union { double f; unsigned int i[2]; } __s; \
+ __s.f = (x); __s.i[0] >> 31; }))
+#endif /* __sparc__ */
+
+#endif /* SOLARIS_MATH_8_CHECK */
+
+
+#if defined( SOLARIS_MATH_9_CHECK )
+#ident "@(#)math_c99.h 1.9 04/11/01 SMI"
+#undef isgreater
+#define isgreater(x, y) __builtin_isgreater(x, y)
+#undef isgreaterequal
+#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
+#undef isless
+#define isless(x, y) __builtin_isless(x, y)
+#undef islessequal
+#define islessequal(x, y) __builtin_islessequal(x, y)
+#undef islessgreater
+#define islessgreater(x, y) __builtin_islessgreater(x, y)
+#undef isunordered
+#define isunordered(x, y) __builtin_isunordered(x, y)
+#endif /* SOLARIS_MATH_9_CHECK */
/* { dg-do run { target *-*-solaris2.1[0-9]* } } */
/* { dg-options "-std=c99 -O" } */
#include <math.h>
#include "c99-math.h"
int main(void)
{
double nan = NAN;
double inf = INFINITY;
double huge = HUGE_VAL;
double norm = __DBL_MIN__;
double zero = 0.0;
C99_MATH_TESTS (nan, inf, huge, norm, zero)
return 0;
}
/* { dg-do run { target *-*-solaris2.1[0-9]* } } */
/* { dg-options "-std=c99 -O" } */
#include <math.h>
#include "c99-math.h"
int main(void)
{
float nan = NAN;
float inf = INFINITY;
float huge = HUGE_VALF;
float norm = __FLT_MIN__;
float zero = 0.0f;
C99_MATH_TESTS (nan, inf, huge, norm, zero)
return 0;
}
#include <math.h>
extern void abort(void);
#define C99_MATH_TESTS(nan, inf, huge, norm, zero) \
{ \
if (fpclassify (nan) != FP_NAN) \
abort (); \
\
if (fpclassify (inf) != FP_INFINITE) \
abort (); \
\
if (fpclassify (huge) != FP_INFINITE) \
abort (); \
\
if (fpclassify (norm) != FP_NORMAL) \
abort (); \
\
if (fpclassify (zero) != FP_ZERO) \
abort (); \
\
\
if (!isnan (nan)) \
abort (); \
\
if (isnan (inf)) \
abort (); \
\
if (isnan (huge)) \
abort (); \
\
if (isnan (norm)) \
abort (); \
\
if (isnan (zero)) \
abort (); \
\
\
if (isinf (nan)) \
abort (); \
\
if (!isinf (inf)) \
abort (); \
\
if (!isinf (huge)) \
abort (); \
\
if (isnan (norm)) \
abort (); \
\
if (isinf (zero)) \
abort (); \
\
\
if (isfinite (nan)) \
abort (); \
\
if (isfinite (inf)) \
abort (); \
\
if (isfinite (huge)) \
abort (); \
\
if (!isfinite (norm)) \
abort (); \
\
if (!isfinite (zero)) \
abort (); \
\
\
if (isnormal (nan)) \
abort (); \
\
if (isnormal (inf)) \
abort (); \
\
if (isnormal (huge)) \
abort (); \
\
if (!isnormal (norm)) \
abort (); \
\
if (isnormal (zero)) \
abort (); \
\
\
if (signbit (norm)) \
abort (); \
\
if (!signbit (-(norm))) \
abort (); \
\
\
if (!isgreater ((inf), (norm))) \
abort (); \
\
if (!isgreaterequal ((inf), (huge))) \
abort (); \
\
if (!isless ((norm), (inf))) \
abort (); \
\
if (!islessequal ((huge), (inf))) \
abort (); \
\
if (!islessgreater ((inf), (norm))) \
abort (); \
\
if (!isunordered ((nan), (norm))) \
abort (); \
}
/* { dg-do run { target *-*-solaris2.1[0-9]* } } */
/* { dg-options "-std=c99 -O" } */
#include <math.h>
#include "c99-math.h"
int main(void)
{
long double nan = NAN;
long double inf = INFINITY;
long double huge = HUGE_VALL;
long double norm = __LDBL_MIN__;
long double zero = 0.0l;
C99_MATH_TESTS (nan, inf, huge, norm, zero)
return 0;
}