diff options
author | Richard Guenther <rguenther@suse.de> | 2009-08-26 13:23:04 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-08-26 13:23:04 +0000 |
commit | 6b8b9e4262617040a6879600a8e411f95ec30b1b (patch) | |
tree | 0a7c596dcfad5b0a80e1635e57a2911b24a32034 /gcc/tree-cfg.c | |
parent | 5c89ef5a3f267a25ffab1735adc754d43c486e0f (diff) | |
download | gcc-6b8b9e4262617040a6879600a8e411f95ec30b1b.zip gcc-6b8b9e4262617040a6879600a8e411f95ec30b1b.tar.gz gcc-6b8b9e4262617040a6879600a8e411f95ec30b1b.tar.bz2 |
re PR c/41163 (verify_gimple fails)
2009-08-26 Richard Guenther <rguenther@suse.de>
PR middle-end/41163
* gimplify.c (gimplify_addr_expr): Canonicalize ADDR_EXPRs if
the types to not match.
* tree-cfg.c (verify_gimple_assign_single): Adjust ADDR_EXPR
verification.
* tree-ssa.c (useless_type_conversion_p): Conversions to
pointers to unprototyped functions are useless.
* gcc.c-torture/compile/pr41163.c: New testcase.
* gcc.dg/pr35899.c: Adjust.
From-SVN: r151122
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 3b99d6c..639c4ec 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; } |