diff options
author | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-03 13:15:35 +0000 |
---|---|---|
committer | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-03 13:15:35 +0000 |
commit | 76f3f3ab80be18250e84d717e161470a00b33d6d (patch) | |
tree | 39b43f209e2695644ffc95e3fb782a47c96c3a90 /gcc/cgraphunit.c | |
parent | 9bab6a7004187addfae6852c402f4d1b36e6cc54 (diff) | |
download | gcc-76f3f3ab80be18250e84d717e161470a00b33d6d.tar.gz |
2011-01-03 Martin Jambor <mjambor@suse.cz>
* cgraphunit.c (verify_cgraph_node): Verify there is no direct call to
a thunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168422 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 36ba75a55ea..ec477ee920b 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -647,6 +647,8 @@ verify_cgraph_node (struct cgraph_node *node) } if (!e->indirect_unknown_callee) { + struct cgraph_node *n; + if (e->callee->same_body_alias) { error ("edge points to same body alias:"); @@ -667,6 +669,15 @@ verify_cgraph_node (struct cgraph_node *node) debug_tree (decl); error_found = true; } + else if (decl + && (n = cgraph_get_node_or_alias (decl)) + && (n->same_body_alias + && n->thunk.thunk_p)) + { + error ("a call to thunk improperly represented " + "in the call graph:"); + debug_gimple_stmt (stmt); + } } else if (decl) { |