aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-10-06 18:38:29 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2011-10-06 18:38:29 +0200
commitb799033017f0b33846490fc4612b4eb29b9ed0c6 (patch)
tree6d63b4a87380ed4deee53471eb0ac57a208ac508 /gcc/tree-ssa.c
parentb966d3a966a20aaa3de54d6a7ea78703ffb22a8d (diff)
downloadgcc-b799033017f0b33846490fc4612b4eb29b9ed0c6.zip
gcc-b799033017f0b33846490fc4612b4eb29b9ed0c6.tar.gz
gcc-b799033017f0b33846490fc4612b4eb29b9ed0c6.tar.bz2
re PR tree-optimization/49279 (Optimization incorrectly presuming constant variable inside loop in g++ 4.5 and 4.6 with -O2 and -O3 for x86_64 targets)
PR tree-optimization/49279 * tree-ssa-structalias.c (find_func_aliases): Don't handle CAST_RESTRICT. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Allow restrict propagation. * tree-ssa.c (useless_type_conversion_p): Don't return false if TYPE_RESTRICT differs. * gcc.dg/tree-ssa/restrict-4.c: XFAIL. * gcc.c-torture/execute/pr49279.c: New test. From-SVN: r179620
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r--gcc/tree-ssa.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index a011593..258a744 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -1270,12 +1270,6 @@ useless_type_conversion_p (tree outer_type, tree inner_type)
!= TYPE_ADDR_SPACE (TREE_TYPE (inner_type)))
return false;
- /* Do not lose casts to restrict qualified pointers. */
- if ((TYPE_RESTRICT (outer_type)
- != TYPE_RESTRICT (inner_type))
- && TYPE_RESTRICT (outer_type))
- return false;
-
/* If the outer type is (void *), the conversion is not necessary. */
if (VOID_TYPE_P (TREE_TYPE (outer_type)))
return true;