diff options
author | Richard Biener <rguenther@suse.de> | 2015-02-16 18:15:19 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-02-16 18:15:19 +0000 |
commit | 7b909872f15f48482a23e41fe8093cb1f4425c74 (patch) | |
tree | 6cb559fe91c65ad408ec96560ca19c4fb3583cf1 /gcc/tree-ssa-structalias.c | |
parent | 3f880d38dc55082cf671731ab4424b3808bbaf30 (diff) | |
download | gcc-7b909872f15f48482a23e41fe8093cb1f4425c74.zip gcc-7b909872f15f48482a23e41fe8093cb1f4425c74.tar.gz gcc-7b909872f15f48482a23e41fe8093cb1f4425c74.tar.bz2 |
re PR tree-optimization/65077 (memcpy generates incorrect code with floating point numbers and -O1)
2015-02-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/65077
* tree-ssa-structalias.c (get_constraint_for_1): Handle
IMAGPART_EXPR, REALPART_EXPR and BIT_FIELD_REF.
(find_func_aliases): Allow float values to carry pointers again.
* gcc.dg/torture/pr65077.c: New testcase.
From-SVN: r220741
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 4c43b75..fd0f535 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -3492,6 +3492,9 @@ get_constraint_for_1 (tree t, vec<ce_s> *results, bool address_p, case ARRAY_REF: case ARRAY_RANGE_REF: case COMPONENT_REF: + case IMAGPART_EXPR: + case REALPART_EXPR: + case BIT_FIELD_REF: get_constraint_for_component_ref (t, results, address_p, lhs_p); return; case VIEW_CONVERT_EXPR: @@ -4712,11 +4715,7 @@ find_func_aliases (struct function *fn, gimple origt) get_constraint_for (lhsop, &lhsc); - if (FLOAT_TYPE_P (TREE_TYPE (lhsop))) - /* If the operation produces a floating point result then - assume the value is not produced to transfer a pointer. */ - ; - else if (code == POINTER_PLUS_EXPR) + if (code == POINTER_PLUS_EXPR) get_constraint_for_ptr_offset (gimple_assign_rhs1 (t), gimple_assign_rhs2 (t), &rhsc); else if (code == BIT_AND_EXPR |