Index: gcc/gcc/config/i386/i386.c |
diff --git a/gcc/gcc/config/i386/i386.c b/gcc/gcc/config/i386/i386.c |
index 4f1c5e1e66aa70e782f5ae37c402b7635b9cc91b..d0612988f47dae4c6c09908ac73407ebaf1f6278 100644 |
--- a/gcc/gcc/config/i386/i386.c |
+++ b/gcc/gcc/config/i386/i386.c |
@@ -8965,6 +8965,9 @@ lea_match_address_operand (rtx op, enum machine_mode mode) |
{ |
struct ix86_address parts; |
+ if (GET_MODE (op) != mode) |
+ return 0; |
+ |
/* 1 and -1 are valid decompose address results for lea operand. */ |
if (ix86_lea_decompose_address (op, &parts) == 0) |
return 0; |