From: Richard Guenther Date: Mon, 18 Aug 2008 14:21:35 +0000 (+0000) Subject: tree-cfg.c (verify_types_in_gimple_assign): Verify copies and loads have the correct... X-Git-Tag: releases/gcc-4.4.0~3096 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f9864e6cf1dbff17c448d96f743542e823e164e;p=thirdparty%2Fgcc.git tree-cfg.c (verify_types_in_gimple_assign): Verify copies and loads have the correct types. 2008-08-18 Richard Guenther * tree-cfg.c (verify_types_in_gimple_assign): Verify copies and loads have the correct types. From-SVN: r139195 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 747e45b06167..46a22ea32e36 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-08-18 Richard Guenther + + * tree-cfg.c (verify_types_in_gimple_assign): Verify copies + and loads have the correct types. + 2008-08-18 Manuel Lopez-Ibanez PR cpp/7263 diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index c1344a75ab30..08920ae531cf 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -3544,6 +3544,7 @@ verify_types_in_gimple_assign (gimple stmt) /* Generic handling via classes. */ switch (TREE_CODE_CLASS (rhs_code)) { + case tcc_exceptional: /* for SSA_NAME */ case tcc_unary: if (!useless_type_conversion_p (lhs_type, rhs1_type)) { @@ -3555,6 +3556,15 @@ verify_types_in_gimple_assign (gimple stmt) break; case tcc_reference: + /* All tcc_reference trees are GIMPLE_SINGLE_RHS. Verify that + no implicit type change happens here. */ + 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); case tcc_comparison: