The attach change fixes PR middle-end/68743 on hppa*-*-hpux*. In compiling c99_functions.c in libgfortran, floor ((double)x) was transformed to floorf(x) but floorf is not available on hppa*-*-hpux*. The change simply adds a libc_has_function check to prevent the transformation.
Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11. Okay for trunk? Dave -- John David Anglin dave.ang...@bell.net
2015-12-28 John David Anglin <dang...@gcc.gnu.org> PR middle-end/68743 * match.pd: Require target has function_c99_math_complex before doing truncl(extend(x)) and trunc(extend(x)) -> extend(truncf(x)), etc. Index: match.pd =================================================================== --- match.pd (revision 231669) +++ match.pd (working copy) @@ -2784,7 +2784,8 @@ BUILT_IN_RINTF BUILT_IN_RINTF) /* truncl(extend(x)) and trunc(extend(x)) -> extend(truncf(x)), etc., if x is a float. */ - (if (optimize && canonicalize_math_p ()) + (if (optimize && canonicalize_math_p () + && targetm.libc_has_function (function_c99_math_complex)) (simplify (froms (convert float_value_p@0)) (convert (tos @0)))))