From 21e62dfa2a67a84aa0bd2ca093046287f13fbcb5 Mon Sep 17 00:00:00 2001 From: Clinton Popetz Date: Tue, 4 Apr 2000 21:10:43 +0000 Subject: [PATCH] builtins.c (expand_builtin_strlen): Force the source to be a memory address. * builtins.c (expand_builtin_strlen): Force the source to be a memory address. From-SVN: r32911 --- gcc/ChangeLog | 5 +++++ gcc/builtins.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 31da5bb1dca..342c6a3065a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-04-04 Clinton Popetz + + * builtins.c (expand_builtin_strlen): Force the source to + be a memory address. + 2000-04-04 Kaveh R. Ghazi * cpplib.c (D): Adjust to call CONCAT2 macro without whitespace. diff --git a/gcc/builtins.c b/gcc/builtins.c index 3540fccda12..1590d38c873 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -1388,7 +1388,8 @@ expand_builtin_strlen (exp, target, mode) /* Now that we are assured of success, expand the source. */ start_sequence (); - pat = expand_expr (src, src_reg, ptr_mode, EXPAND_SUM); + pat = memory_address (BLKmode, + expand_expr (src, src_reg, ptr_mode, EXPAND_SUM)); if (pat != src_reg) emit_move_insn (src_reg, pat); pat = gen_sequence ();