I stumbled on a case like this: If the multipliers allowed for addressing modes are dependent on actual mode, in some cases compiler refuses to recognize address as legitimate. It boils down to this place in expr.c where address_mode is incorrectly used instead of actual mode.
I rebootstraped and tested on x86_64-linux-gnu but there's no testcase to see the improved behavior... Please patch the trunk. Thanks Igor ===== 2013-10-24 Igor Shevlyakov<igor.shevlyakov@**gmail.com<igor.shevlya...@gmail.com> > * expr.c (expand_expr_real_1): Use proper memory access mode instead of address_mode in the call to memory_address_addr_space. Index: gcc/expr.c =================================================================== --- gcc/expr.c (revision 204036) +++ gcc/expr.c (working copy) @@ -9642,7 +9642,7 @@ expand_expr_real_1 (tree exp, rtx target } align = get_object_alignment (exp); op0 = expand_expr (base, NULL_RTX, VOIDmode, EXPAND_SUM); - op0 = memory_address_addr_space (address_mode, op0, as); + op0 = memory_address_addr_space (mode, op0, as); if (!integer_zerop (TREE_OPERAND (exp, 1))) { rtx off