diff options
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 3b99d6c5a30..639c4ec710c 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -3889,12 +3889,13 @@ verify_gimple_assign_single (gimple stmt) return true; } - if (!one_pointer_to_useless_type_conversion_p (lhs_type, - TREE_TYPE (op))) + if (!types_compatible_p (TREE_TYPE (op), TREE_TYPE (TREE_TYPE (rhs1))) + && !one_pointer_to_useless_type_conversion_p (TREE_TYPE (rhs1), + TREE_TYPE (op))) { error ("type mismatch in address expression"); - debug_generic_stmt (lhs_type); - debug_generic_stmt (TYPE_POINTER_TO (TREE_TYPE (op))); + debug_generic_stmt (TREE_TYPE (rhs1)); + debug_generic_stmt (TREE_TYPE (op)); return true; } |