aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index f02eb19..e92e63f 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -12958,18 +12958,14 @@ gimple_canonical_types_compatible_p (const_tree t1, const_tree t2,
&& TYPE_STRING_FLAG (t1) != TYPE_STRING_FLAG (t2))
return false;
- /* For canonical type comparisons we do not want to build SCCs
- so we cannot compare pointed-to types. But we can, for now,
- require the same pointed-to type kind and match what
- useless_type_conversion_p would do. */
+ /* Fortran standard define C_PTR type that is compatible with every
+ C pointer. For this reason we need to glob all pointers into one.
+ Still pointers in different address spaces are not compatible. */
if (POINTER_TYPE_P (t1))
{
if (TYPE_ADDR_SPACE (TREE_TYPE (t1))
!= TYPE_ADDR_SPACE (TREE_TYPE (t2)))
return false;
-
- if (TREE_CODE (TREE_TYPE (t1)) != TREE_CODE (TREE_TYPE (t2)))
- return false;
}
/* Tail-recurse to components. */