aboutsummaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-12-12 08:01:09 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1993-12-12 08:01:09 -0500
commitb0e0a0f9a896325adff6975a7ccf152bb7fc09cd (patch)
tree4d2efe95cd5fac66ba8cc028203cd12be779c8cf /gcc/recog.c
parentcc79451b143419faf1d7c587d82aaa7627679bac (diff)
downloadgcc-b0e0a0f9a896325adff6975a7ccf152bb7fc09cd.zip
gcc-b0e0a0f9a896325adff6975a7ccf152bb7fc09cd.tar.gz
gcc-b0e0a0f9a896325adff6975a7ccf152bb7fc09cd.tar.bz2
(indirect_operand): Verify mode of OP is correct.
From-SVN: r6222
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index 2232db2..b3ae350 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -1088,6 +1088,9 @@ indirect_operand (op, mode)
- MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (inner))));
#endif
+ if (mode != VOIDmode && GET_MODE (op) != mode)
+ return 0;
+
/* The only way that we can have a general_operand as the resulting
address is if OFFSET is zero and the address already is an operand
or if the address is (plus Y (const_int -OFFSET)) and Y is an