diff options
| author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-23 22:12:22 +0000 |
|---|---|---|
| committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-23 22:12:22 +0000 |
| commit | a3d67bb487a641f65b6c56adfefb7dc559f2209f (patch) | |
| tree | dd25ec5db7e8a967668ec09dccd7b3a54a0c1657 | |
| parent | 071f1696eb402af38d8e1c654a469afb98431f63 (diff) | |
| download | ppe42-gcc-a3d67bb487a641f65b6c56adfefb7dc559f2209f.tar.gz ppe42-gcc-a3d67bb487a641f65b6c56adfefb7dc559f2209f.zip | |
* calls.c (expand_call): If TARGET is passed by reference and
is readonly, write a CLOBBER.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32716 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/calls.c | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index baf3ad69b64..45bfc374131 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu Mar 23 17:10:48 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * calls.c (expand_call): If TARGET is passed by reference and + is readonly, write a CLOBBER. + 2000-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * builtins.c (expand_builtin): Handle bcmp. diff --git a/gcc/calls.c b/gcc/calls.c index 4c8d573d222..dfb38ee6d7e 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -2776,6 +2776,14 @@ expand_call (exp, target, ignore) if (is_longjmp) current_function_calls_longjmp = 1, sibcall_failure = 1; + /* If this function is returning into a memory location marked as + readonly, it means it is initializing that location. But we normally + treat functions as not clobbering such locations, so we need to + specify that this one does. */ + if (target != 0 && GET_CODE (target) == MEM + && structure_value_addr != 0 && RTX_UNCHANGING_P (target)) + emit_insn (gen_rtx_CLOBBER (VOIDmode, target)); + /* If value type not void, return an rtx for the value. */ /* If there are cleanups to be called, don't use a hard reg as target. |

