]>
Commit | Line | Data |
---|---|---|
9f16d56b JB |
1 | 2006-10-04 Richard Henderson <rth@redhat.com> |
2 | Jakub Jelinek <jakub@redhat.com> | |
3 | ||
4 | * tree-ssa-address.c (gen_addr_rtx): Check for const-ness of the | |
5 | address before wrapping in CONST. | |
6 | ||
7 | Index: tree-ssa-address.c | |
8 | =================================================================== | |
9 | --- tree-ssa-address.c (revision 124014) | |
10 | +++ tree-ssa-address.c (working copy) | |
11 | @@ -1,5 +1,5 @@ | |
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. | |
15 | ||
16 | This file is part of GCC. | |
17 | ||
18 | @@ -134,10 +134,15 @@ | |
19 | act_elem = symbol; | |
20 | if (offset) | |
21 | { | |
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); | |
25 | + | |
26 | if (offset_p) | |
27 | - *offset_p = &XEXP (XEXP (act_elem, 0), 1); | |
28 | + *offset_p = &XEXP (act_elem, 1); | |
29 | + | |
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); | |
34 | } | |
35 | ||
36 | if (*addr) |