]> git.pld-linux.org Git - packages/gcc4.git/blob - gcc-4.1-pr29826.patch
- added from gcc/
[packages/gcc4.git] / gcc-4.1-pr29826.patch
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)
This page took 0.069728 seconds and 3 git commands to generate.