[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-patches
Subject: [PATCH] Re-instantiate type checking for binary expressions
From: Richard Guenther <rguenther () suse ! de>
Date: 2008-08-31 11:05:07
Message-ID: alpine.LNX.1.10.0808311304070.14563 () zhemvz ! fhfr ! qr
[Download RAW message or body]
This was also lost during the tuples conversion.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to the trunk.
Richard.
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.
Index: gcc/tree-cfg.c
===================================================================
*** gcc/tree-cfg.c.orig 2008-08-31 12:53:09.000000000 +0200
--- gcc/tree-cfg.c 2008-08-31 12:59:15.000000000 +0200
*************** verify_types_in_gimple_assign (gimple st
*** 3549,3556 ****
if (!useless_type_conversion_p (lhs_type, rhs1_type))
{
error ("non-trivial conversion at assignment");
! debug_generic_expr (lhs);
! debug_generic_expr (rhs1);
return true;
}
break;
--- 3549,3573 ----
if (!useless_type_conversion_p (lhs_type, rhs1_type))
{
error ("non-trivial conversion at assignment");
! 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;
*************** verify_types_in_gimple_assign (gimple st
*** 3561,3568 ****
if (!useless_type_conversion_p (lhs_type, rhs1_type))
{
error ("non-trivial conversion at assignment");
! debug_generic_expr (lhs);
! debug_generic_expr (rhs1);
return true;
}
return verify_types_in_gimple_reference (rhs1);
--- 3578,3585 ----
if (!useless_type_conversion_p (lhs_type, rhs1_type))
{
error ("non-trivial conversion at assignment");
! debug_generic_expr (lhs_type);
! debug_generic_expr (rhs1_type);
return true;
}
return verify_types_in_gimple_reference (rhs1);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic