aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc/builtins.c
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2006-08-26 21:37:21 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2006-08-26 21:37:21 +0000
commitf2d5255dddb566c0d6b86d6d6c0a1dd497d92168 (patch)
tree36bfe9866a842f09652778d17edc7168f0d238df /contrib/gcc/builtins.c
parent837e5b8c9e5a328359b7f8e19e6bc0ca6c6ed0e1 (diff)
downloadsrc-f2d5255dddb566c0d6b86d6d6c0a1dd497d92168.tar.gz
src-f2d5255dddb566c0d6b86d6d6c0a1dd497d92168.zip
Resolve conflicts after GCC 3.4.6 20060825 import.
Notes
Notes: svn path=/head/; revision=161660
Diffstat (limited to 'contrib/gcc/builtins.c')
-rw-r--r--contrib/gcc/builtins.c37
1 files changed, 23 insertions, 14 deletions
diff --git a/contrib/gcc/builtins.c b/contrib/gcc/builtins.c
index a3e069e4baca..2931684a9a62 100644
--- a/contrib/gcc/builtins.c
+++ b/contrib/gcc/builtins.c
@@ -4329,14 +4329,15 @@ static rtx
expand_builtin_fputs (tree arglist, rtx target, bool unlocked)
{
tree len, fn;
- tree fn_fputc = unlocked ? implicit_built_in_decls[BUILT_IN_FPUTC_UNLOCKED]
+ /* If we're using an unlocked function, assume the other unlocked
+ functions exist explicitly. */
+ tree const fn_fputc = unlocked ? built_in_decls[BUILT_IN_FPUTC_UNLOCKED]
: implicit_built_in_decls[BUILT_IN_FPUTC];
- tree fn_fwrite = unlocked ? implicit_built_in_decls[BUILT_IN_FWRITE_UNLOCKED]
+ 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 (target != const0_rtx || !fn_fputc || !fn_fwrite)
+ /* If the return value is used, don't do the transformation. */
+ if (target != const0_rtx)
return 0;
/* Verify the arguments in the original call. */
@@ -4397,6 +4398,11 @@ expand_builtin_fputs (tree arglist, rtx target, bool unlocked)
abort ();
}
+ /* If the replacement _DECL isn't initialized, don't do the
+ transformation. */
+ if (!fn)
+ return 0;
+
return expand_expr (build_function_call_expr (fn, arglist),
const0_rtx, VOIDmode, EXPAND_NORMAL);
}
@@ -4651,11 +4657,12 @@ static rtx
expand_builtin_printf (tree arglist, rtx target, enum machine_mode mode,
bool unlocked)
{
- tree fn_putchar = unlocked
- ? implicit_built_in_decls[BUILT_IN_PUTCHAR_UNLOCKED]
- : implicit_built_in_decls[BUILT_IN_PUTCHAR];
- tree fn_puts = unlocked ? implicit_built_in_decls[BUILT_IN_PUTS_UNLOCKED]
- : implicit_built_in_decls[BUILT_IN_PUTS];
+ /* If we're using an unlocked function, assume the other unlocked
+ functions exist explicitly. */
+ tree const fn_putchar = unlocked ? built_in_decls[BUILT_IN_PUTCHAR_UNLOCKED]
+ : implicit_built_in_decls[BUILT_IN_PUTCHAR];
+ tree const fn_puts = unlocked ? built_in_decls[BUILT_IN_PUTS_UNLOCKED]
+ : implicit_built_in_decls[BUILT_IN_PUTS];
const char *fmt_str;
tree fn, fmt, arg;
@@ -4754,10 +4761,12 @@ static rtx
expand_builtin_fprintf (tree arglist, rtx target, enum machine_mode mode,
bool unlocked)
{
- tree fn_fputc = unlocked ? implicit_built_in_decls[BUILT_IN_FPUTC_UNLOCKED]
- : implicit_built_in_decls[BUILT_IN_FPUTC];
- tree fn_fputs = unlocked ? implicit_built_in_decls[BUILT_IN_FPUTS_UNLOCKED]
- : implicit_built_in_decls[BUILT_IN_FPUTS];
+ /* If we're using an unlocked function, assume the other unlocked
+ functions exist explicitly. */
+ tree const fn_fputc = unlocked ? built_in_decls[BUILT_IN_FPUTC_UNLOCKED]
+ : implicit_built_in_decls[BUILT_IN_FPUTC];
+ tree const fn_fputs = unlocked ? built_in_decls[BUILT_IN_FPUTS_UNLOCKED]
+ : implicit_built_in_decls[BUILT_IN_FPUTS];
const char *fmt_str;
tree fn, fmt, fp, arg;