summaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-21 06:32:54 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-21 06:32:54 +0000
commit0353bcea3894f3e2e70f1a19fa95b84db20b3f3e (patch)
tree379bc935342ebf1d5878640474035e1204555845 /gcc/tree-cfg.c
parenta6e60f51f8bf4ad1960cf29dc4d20847b8b9f1b8 (diff)
downloadgcc-0353bcea3894f3e2e70f1a19fa95b84db20b3f3e.tar.gz
2010-10-21 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 165748 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@165750 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index ff0c2ad2bf8..bffa67922ce 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3107,8 +3107,7 @@ verify_gimple_call (gimple stmt)
call, and the decl should have DECL_STATIC_CHAIN set. */
if (gimple_call_chain (stmt))
{
- if (TREE_CODE (fn) != ADDR_EXPR
- || TREE_CODE (TREE_OPERAND (fn, 0)) != FUNCTION_DECL)
+ if (!gimple_call_fndecl (stmt))
{
error ("static chain in indirect gimple call");
return true;
@@ -3698,7 +3697,13 @@ verify_gimple_assign_single (gimple stmt)
return true;
}
- if (!types_compatible_p (TREE_TYPE (op), TREE_TYPE (TREE_TYPE (rhs1)))
+ /* Technically there is no longer a need for matching types, but
+ gimple hygiene asks for this check. In LTO we can end up
+ combining incompatible units and thus end up with addresses
+ of globals that change their type to a common one. */
+ if (!in_lto_p
+ && !types_compatible_p (TREE_TYPE (op),
+ TREE_TYPE (TREE_TYPE (rhs1)))
&& !one_pointer_to_useless_type_conversion_p (TREE_TYPE (rhs1),
TREE_TYPE (op)))
{