1 2006-10-04 Richard Henderson <rth@redhat.com>
2 Jakub Jelinek <jakub@redhat.com>
4 * tree-ssa-address.c (gen_addr_rtx): Check for const-ness of the
5 address before wrapping in CONST.
7 Index: tree-ssa-address.c
8 ===================================================================
9 --- tree-ssa-address.c (revision 124014)
10 +++ tree-ssa-address.c (working copy)
12 /* Memory address lowering and addressing mode selection.
13 - Copyright (C) 2004 Free Software Foundation, Inc.
14 + Copyright (C) 2004, 2006 Free Software Foundation, Inc.
16 This file is part of GCC.
22 - act_elem = gen_rtx_CONST (Pmode,
23 - gen_rtx_PLUS (Pmode, act_elem, offset));
24 + act_elem = gen_rtx_PLUS (Pmode, act_elem, offset);
27 - *offset_p = &XEXP (XEXP (act_elem, 0), 1);
28 + *offset_p = &XEXP (act_elem, 1);
30 + if (GET_CODE (symbol) == SYMBOL_REF
31 + || GET_CODE (symbol) == LABEL_REF
32 + || GET_CODE (symbol) == CONST)
33 + act_elem = gen_rtx_CONST (Pmode, act_elem);