aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-08-31 11:06:10 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-08-31 11:06:10 +0000
commitf5e85907ff9383b4070b144d42b2d592dcc5da9f (patch)
tree88d5a6706133911677ee26797c26287a872ce35a /gcc
parente157f73660e50bd02f5c2c6d94624de70303e579 (diff)
downloadgcc-f5e85907ff9383b4070b144d42b2d592dcc5da9f.zip
gcc-f5e85907ff9383b4070b144d42b2d592dcc5da9f.tar.gz
gcc-f5e85907ff9383b4070b144d42b2d592dcc5da9f.tar.bz2
tree-cfg.c (verify_types_in_gimple_assign): Dump mismatched types instead of operands.
2008-08-31 Richard Guenther <rguenther@suse.de> * tree-cfg.c (verify_types_in_gimple_assign): Dump mismatched types instead of operands. Re-instantiate verifying of binary expression operands. From-SVN: r139823
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-cfg.c25
2 files changed, 27 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 742e28a..ca121a1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-31 Richard Guenther <rguenther@suse.de>
+
+ * tree-cfg.c (verify_types_in_gimple_assign): Dump mismatched
+ types instead of operands. Re-instantiate verifying of
+ binary expression operands.
+
2008-08-30 Jan Hubicka <jh@suse.cz>
* fwprop.c (should_replace_address): Add speed attribute.
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 39a04e9..c485027 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3549,8 +3549,25 @@ verify_types_in_gimple_assign (gimple stmt)
if (!useless_type_conversion_p (lhs_type, rhs1_type))
{
error ("non-trivial conversion at assignment");
- debug_generic_expr (lhs);
- debug_generic_expr (rhs1);
+ debug_generic_expr (lhs_type);
+ debug_generic_expr (rhs1_type);
+ return true;
+ }
+ break;
+
+ case tcc_binary:
+ if (!is_gimple_val (rhs1) || !is_gimple_val (rhs2))
+ {
+ error ("invalid operands in binary expression");
+ return true;
+ }
+ if (!useless_type_conversion_p (lhs_type, rhs1_type)
+ || !useless_type_conversion_p (lhs_type, rhs2_type))
+ {
+ error ("type mismatch in binary expression");
+ debug_generic_stmt (lhs_type);
+ debug_generic_stmt (rhs1_type);
+ debug_generic_stmt (rhs2_type);
return true;
}
break;
@@ -3561,8 +3578,8 @@ verify_types_in_gimple_assign (gimple stmt)
if (!useless_type_conversion_p (lhs_type, rhs1_type))
{
error ("non-trivial conversion at assignment");
- debug_generic_expr (lhs);
- debug_generic_expr (rhs1);
+ debug_generic_expr (lhs_type);
+ debug_generic_expr (rhs1_type);
return true;
}
return verify_types_in_gimple_reference (rhs1);