Condition builtins-8.c cbrt test on HAVE_C99_RUNTIME
Joseph S. Myers
joseph@codesourcery.com
Thu Sep 11 06:44:00 GMT 2008
gcc.dg/builtins-8.c contains a test of cbrt, a C99 function, which should
be conditional on HAVE_C99_RUNTIME (otherwise GCC does not do the
optimization being tested, even if the system does in fact have cbrt). OK
to commit this patch to fix the test?
2008-09-11 Joseph Myers <joseph@codesourcery.com>
* gcc.dg/builtins-8.c: Condition cbrt test on HAVE_C99_RUNTIME.
Index: gcc.dg/builtins-8.c
===================================================================
--- gcc.dg/builtins-8.c (revision 140170)
+++ gcc.dg/builtins-8.c (working copy)
@@ -27,8 +27,10 @@
if (pow(x,0.5) != sqrt(x))
abort ();
+#ifdef HAVE_C99_RUNTIME
if (pow(x,1.0/3.0) != cbrt(x))
abort ();
+#endif
}
int main()
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list