aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2004-10-03 22:50:18 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2004-10-03 22:50:18 +0000
commit103b83eaf0e63701d5b84704723230e1d5c36a78 (patch)
treecb023ef62bccdc4f746a08230981eb58c95cdd6a /gcc/expr.c
parentbf50d091ca5e3fc7a81fa19daa0c9fe02da5fff8 (diff)
downloadgcc-103b83eaf0e63701d5b84704723230e1d5c36a78.zip
gcc-103b83eaf0e63701d5b84704723230e1d5c36a78.tar.gz
gcc-103b83eaf0e63701d5b84704723230e1d5c36a78.tar.bz2
expr.c (expand_expr_addr_expr): Only accept Pmode or ptr_mode as valid modes to expand address expressions.
* expr.c (expand_expr_addr_expr): Only accept Pmode or ptr_mode as valid modes to expand address expressions. From-SVN: r88464
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 5db2c28..2baea73 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6201,7 +6201,7 @@ expand_expr_addr_expr (tree exp, rtx target, enum machine_mode tmode,
/* We can get called with some Weird Things if the user does silliness
like "(short) &a". In that case, convert_memory_address won't do
the right thing, so ignore the given target mode. */
- if (!targetm.valid_pointer_mode (tmode))
+ if (tmode != Pmode && tmode != ptr_mode)
tmode = Pmode;
result = expand_expr_addr_expr_1 (TREE_OPERAND (exp, 0), target,