+2010-07-05 Richard Guenther <rguenther@suse.de>
+
+ * tree-cfg.c (verify_gimple_return): Handle DECL_BY_REFERENCE
+ RESULT_DECLs properly.
+
2010-07-04 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/44695
2010-07-04 Jan Hubicka <jh@suse.cz>
- * cgraphunit.c (init_cgraph): Only initialize dump file if it is not already
- initialized.
+ * cgraphunit.c (init_cgraph): Only initialize dump file if it is not
+ already initialized.
2010-07-04 Richard Sandiford <rdsandiford@googlemail.com>
return true;
}
- if (!useless_type_conversion_p (restype, TREE_TYPE (op))
- /* ??? With C++ we can have the situation that the result
- decl is a reference type while the return type is an aggregate. */
- && !(TREE_CODE (op) == RESULT_DECL
- && TREE_CODE (TREE_TYPE (op)) == REFERENCE_TYPE
- && useless_type_conversion_p (restype, TREE_TYPE (TREE_TYPE (op)))))
+ if ((TREE_CODE (op) == RESULT_DECL
+ && DECL_BY_REFERENCE (op))
+ || (TREE_CODE (op) == SSA_NAME
+ && TREE_CODE (SSA_NAME_VAR (op)) == RESULT_DECL
+ && DECL_BY_REFERENCE (SSA_NAME_VAR (op))))
+ op = TREE_TYPE (op);
+
+ if (!useless_type_conversion_p (restype, TREE_TYPE (op)))
{
error ("invalid conversion in return statement");
debug_generic_stmt (restype);