summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-03 22:50:18 +0000
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-03 22:50:18 +0000
commit09a631c4d8b2bd8ff4f33b12f39e410bb9733c70 (patch)
treecb023ef62bccdc4f746a08230981eb58c95cdd6a /gcc/expr.c
parenta269bb719d2654b21c8f2fa75ce870b872de68e5 (diff)
downloadgcc-09a631c4d8b2bd8ff4f33b12f39e410bb9733c70.tar.gz
* expr.c (expand_expr_addr_expr): Only accept Pmode or ptr_mode
as valid modes to expand address expressions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88464 138bc75d-0d04-0410-961f-82ee72b054a4
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 5db2c280038..2baea73cecb 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,