+2005-11-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ PR middle-end/25158
+ * builtins.c (fold_builtin_fputs): Defer check for missing
+ replacement functions.
+
2005-11-30 Kean Johnston <jkj@sco.com>
* config/i386/i386.c: Check the value of SUPPORTS_ONE_ONLY, not
tree const fn_fwrite = unlocked ? built_in_decls[BUILT_IN_FWRITE_UNLOCKED]
: implicit_built_in_decls[BUILT_IN_FWRITE];
- /* If the return value is used, or the replacement _DECL isn't
- initialized, don't do the transformation. */
- if (!ignore || !fn_fputc || !fn_fwrite)
+ /* If the return value is used, don't do the transformation. */
+ if (!ignore)
return 0;
/* Verify the arguments in the original call. */
gcc_unreachable ();
}
+ /* If the replacement _DECL isn't initialized, don't do the
+ transformation. */
+ if (!fn)
+ return 0;
+
/* These optimizations are only performed when the result is ignored,
hence there's no need to cast the result to integer_type_node. */
return build_function_call_expr (fn, arglist);