diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2001-01-02 02:31:22 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2001-01-01 21:31:22 -0500 |
commit | d1608933b95df6978bf6683ededf4d05af9d65f4 (patch) | |
tree | c7c92d96f32e636df33dde2f85860e4404e7cb89 /gcc/expmed.c | |
parent | 09f89307d376748a461cc4b4aa3808a75384ca89 (diff) | |
download | gcc-d1608933b95df6978bf6683ededf4d05af9d65f4.zip gcc-d1608933b95df6978bf6683ededf4d05af9d65f4.tar.gz gcc-d1608933b95df6978bf6683ededf4d05af9d65f4.tar.bz2 |
function.c (expand_function_end): Properly handle DECL_RESULT and copy when ptr_mode != Pmode.
* function.c (expand_function_end): Properly handle DECL_RESULT
and copy when ptr_mode != Pmode.
* expmed.c (make_tree): Convert X from Pmode to ptr_mode, if needed.
From-SVN: r38607
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 6d6e6f5..0661e10 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -1,7 +1,7 @@ /* Medium-level subroutines: convert bit-field store and extract and shifts, multiplies and divides to rtl instructions. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000 Free Software Foundation, Inc. + 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. @@ -4066,6 +4066,14 @@ make_tree (type, x) default: t = make_node (RTL_EXPR); TREE_TYPE (t) = type; + +#ifdef POINTERS_EXTEND_UNSIGNED + /* If TYPE is a POINTER_TYPE, X might be Pmode with TYPE_MODE being + ptr_mode. So convert. */ + if (POINTER_TYPE_P (type) && GET_MODE (x) != TYPE_MODE (type)) + x = convert_memory_address (TYPE_MODE (type), x); +#endif + RTL_EXPR_RTL (t) = x; /* There are no insns to be output when this rtl_expr is used. */ |