aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r--gcc/tree-ssa.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 128b4e8..f7306b1 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -1117,12 +1117,8 @@ useless_type_conversion_p_1 (tree outer_type, tree inner_type)
!= get_alias_set (TREE_TYPE (outer_type))))
return false;
- /* Do not lose casts from const qualified to non-const
- qualified. */
- if ((TYPE_READONLY (TREE_TYPE (outer_type))
- != TYPE_READONLY (TREE_TYPE (inner_type)))
- && TYPE_READONLY (TREE_TYPE (inner_type)))
- return false;
+ /* We do not care for const qualification of the pointed-to types
+ as const qualification has no semantic value to the middle-end. */
/* Do not lose casts to restrict qualified pointers. */
if ((TYPE_RESTRICT (outer_type)