summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-07 10:13:25 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-07 10:13:25 +0000
commit6d72287b7ad40b4ebac984afcab7c2ee3577aed4 (patch)
tree73257bbd69a5a06f1b84a4d755f735c5fa36e36c /gcc/emit-rtl.c
parentb2e3737c0119de5dde1b562d6c40cc86f6b9e6bb (diff)
downloadgcc-6d72287b7ad40b4ebac984afcab7c2ee3577aed4.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158045 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 6e1f9490614..dda2b0f0f70 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1750,6 +1750,7 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
/* ??? Any reason the field size would be different than
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)
@@ -1757,6 +1758,15 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
expr = t2;
offset = NULL;
}
+
+ /* 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 this is a Fortran indirect argument reference, record the
@@ -1769,6 +1779,15 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
offset = NULL;
}
+ /* 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