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
This commit is contained in:
Clinton Popetz
2000-04-04 21:10:43 +00:00
committed by Clinton Popetz
parent 7c32404c2d
commit 21e62dfa2a
2 changed files with 7 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2000-04-04 Clinton Popetz <cpopetz@cygnus.com>
* builtins.c (expand_builtin_strlen): Force the source to
be a memory address.
2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cpplib.c (D): Adjust to call CONCAT2 macro without whitespace.

View File

@@ -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 ();