summaryrefslogtreecommitdiff
path: root/gcc/profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/profile.c')
-rw-r--r--gcc/profile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/profile.c b/gcc/profile.c
index 4809d7fbe54..17923c54394 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -1667,7 +1667,13 @@ output_func_start_profiler ()
TREE_PUBLIC (fndecl) = 1;
DECL_ASSEMBLER_NAME (fndecl) = fnname;
DECL_RESULT (fndecl) = build_decl (RESULT_DECL, NULL_TREE, void_type_node);
+
+ fndecl = pushdecl (fndecl);
+ rest_of_decl_compilation (fndecl, 0, 1, 0);
+ announce_function (fndecl);
current_function_decl = fndecl;
+ DECL_INITIAL (fndecl) = error_mark_node;
+ temporary_allocation ();
pushlevel (0);
make_function_rtl (fndecl);
init_function_start (fndecl, input_filename, lineno);