summaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 4b3a962fbd3..3d0fee5ba94 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1836,6 +1836,9 @@ cgraph_add_new_function (tree fndecl, bool lowered)
push_cfun (DECL_STRUCT_FUNCTION (fndecl));
current_function_decl = fndecl;
gimple_register_cfg_hooks ();
+ /* C++ Thunks are emitted late via this function, gimplify them. */
+ if (!gimple_body (fndecl))
+ gimplify_function_tree (fndecl);
tree_lowering_passes (fndecl);
bitmap_obstack_initialize (NULL);
if (!gimple_in_ssa_p (DECL_STRUCT_FUNCTION (fndecl)))