OSDN Git Service

2010-04-07 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Apr 2010 10:13:25 +0000 (10:13 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:17:13 +0000 (14:17 +0900)
PR middle-end/42617
* emit-rtl.c (set_mem_attributes_minus_bitpos): Do not
discard plain indirect references.
* fold-const.c (operand_equal_p): Guard against NULL_TREE
type.
* tree.c (tree_nop_conversion): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158045 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/emit-rtl.c

index e88ce75..62e9d42 100644 (file)
@@ -1,3 +1,12 @@
+2010-04-07  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/42617
+       * emit-rtl.c (set_mem_attributes_minus_bitpos): Do not
+       discard plain indirect references.
+       * fold-const.c (operand_equal_p): Guard against NULL_TREE
+       type.
+       * tree.c (tree_nop_conversion): Likewise.
+
 2010-04-07  Dodji Seketeli  <dodji@redhat.com>
 
        PR debug/43628
index e0acc0c..b5c4185 100644 (file)
@@ -1782,6 +1782,15 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
                 the size we got from the type?  */
            }
 
+         else if (flag_argument_noalias > 1
+                  && (INDIRECT_REF_P (t2))
+                  && TREE_CODE (TREE_OPERAND (t2, 0)) == PARM_DECL)
+           {
+             expr = t;
+             offset = const0_rtx;
+             apply_bitpos = bitpos;
+           }
+
          /* If this is an indirect reference, record it.  */
          else if (TREE_CODE (t) == INDIRECT_REF
                   || TREE_CODE (t) == MISALIGNED_INDIRECT_REF)
@@ -1801,6 +1810,15 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
          apply_bitpos = bitpos;
        }
 
+      /* If this is an indirect reference, record it.  */
+      else if (TREE_CODE (t) == INDIRECT_REF
+              || TREE_CODE (t) == MISALIGNED_INDIRECT_REF)
+       {
+         expr = t;
+         offset = const0_rtx;
+         apply_bitpos = bitpos;
+       }
+
       if (!align_computed && !INDIRECT_REF_P (t))
        {
          unsigned int obj_align