aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenth@gcc.gnu.org>2005-06-07 10:05:09 +0000
committerRichard Guenther <rguenth@gcc.gnu.org>2005-06-07 10:05:09 +0000
commit573dad33be1127ec3b1192f49b91c819414a0807 (patch)
tree6b0e38bdf68aa0c276dc420f0805185225679cc1 /gcc/tree-ssa.c
parentf32c0ba4dd18b6ec09264c3bee3d2b9ecbf52b3f (diff)
2005-06-07 Richard Guenther <rguenth@gcc.gnu.org>
* tree-ssa.c (tree_ssa_useless_type_conversion_1): Fix comments. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@100704 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r--gcc/tree-ssa.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 03e39a5ee55..0a83b786b7d 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -849,8 +849,8 @@ delete_tree_ssa (void)
}
-/* Return true if EXPR is a useless type conversion, otherwise return
- false. */
+/* Return true if the conversion from INNER_TYPE to OUTER_TYPE is a
+ useless type conversion, otherwise return false. */
bool
tree_ssa_useless_type_conversion_1 (tree outer_type, tree inner_type)
@@ -881,8 +881,9 @@ tree_ssa_useless_type_conversion_1 (tree outer_type, tree inner_type)
&& TREE_CODE (TREE_TYPE (outer_type)) == VOID_TYPE)
return true;
- /* Pointers and references are equivalent once we get to GENERIC,
- so strip conversions that just switch between them. */
+ /* Pointers/references are equivalent if their pointed to types
+ are effectively the same. This allows to strip conversions between
+ pointer types with different type qualifiers. */
else if (POINTER_TYPE_P (inner_type)
&& POINTER_TYPE_P (outer_type)
&& TYPE_REF_CAN_ALIAS_ALL (inner_type)