aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2014-11-07 14:37:41 +0100
committerMartin Liska <marxin@gcc.gnu.org>2014-11-07 13:37:41 +0000
commitd862b3439d1996c99a532476a181b6f3c0c69257 (patch)
tree44b0f6f1cd72bc93601e630fc040c05a75668f33 /gcc/cgraphunit.c
parent6343f5d75ba50fb9620a8faaf410d2f5648f62df (diff)
downloadgcc-d862b3439d1996c99a532476a181b6f3c0c69257.zip
gcc-d862b3439d1996c99a532476a181b6f3c0c69257.tar.gz
gcc-d862b3439d1996c99a532476a181b6f3c0c69257.tar.bz2
re PR ipa/63580 (ICE : error: invalid argument to gimple call)
PR ipa/63580 * cgraphunit.c (cgraph_node::create_wrapper): TREE_ADDRESSABLE is set to false for a newly created thunk. * g++.dg/ipa/pr63580.C: New test. From-SVN: r217222
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 75d4140..25af234 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -2369,6 +2369,14 @@ cgraph_node::create_wrapper (cgraph_node *target)
cgraph_edge *e = create_edge (target, NULL, 0, CGRAPH_FREQ_BASE);
+ tree arguments = DECL_ARGUMENTS (decl);
+
+ while (arguments)
+ {
+ TREE_ADDRESSABLE (arguments) = false;
+ arguments = TREE_CHAIN (arguments);
+ }
+
expand_thunk (false, true);
e->call_stmt_cannot_inline_p = true;