summaryrefslogtreecommitdiff
path: root/gcc/coverage.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-15 00:59:28 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-15 00:59:28 +0000
commit37b9a732df3f780ec9be4eeebe5573dcecb464ad (patch)
treef3051c561271e0d6315435584c95dbebfa9c2c8c /gcc/coverage.c
parent8cc085df6f7931a68a5bbb6220a4043bf8c8ee1a (diff)
downloadgcc-37b9a732df3f780ec9be4eeebe5573dcecb464ad.tar.gz
* coverage.c (create_coverage): Do not call pushlevel/poplevel.
* langhooks-def.h (lhd_do_nothing_iii_return_null_tree): New function. * langhooks.c (lhd_do_nothing_iii_return_null_tree): Define it. PR c++/3907 * class.c (maybe_note_name_used_in_class): Refine test for whether or not we are in a class scope. * cp-tree.h (language_function): Remove x_expanding_p. (expanding_p): Remove. (doing_semantic_analysis_p): Remove. (scope_kind): Add sk_function_parms, sk_class, sk_namespace. (innermost_scope_kind): New method. * call.c (cxx_type_promotes_to): Use type_decays_to. * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine. (LANG_HOOKS_POPLEVEL): Likewise. * decl.c (cp_binding_level): Remove parm_flag, template_parms_p, template_spec_p, namespace_p, is_for_scope, is_try_scope, and is_catch_scope. Add kind and explicit_spec_p. (cxx_scope_descriptor): Use a lookup table. (find_class_binding_level): Use "kind" field in binding_level, not the various flags. (pop_binding_level): Likewise. (innermost_nonclass_level): Likewise. (toplevel_bindings_p): Likewise. (namespace_bindings_p): Likewise. (template_parm_scope_p): Likewise. (innermost_scope_kind): New method. (current_tmpl_spec_kind): Use "kind" field in binding_level, not the various flags. (pushlevel): Remove check for doing_semantic_analysis_p. (begin_scope): Simplify. (add_decl_to_level): Use "kind" field in binding_level, not the various flags. (push_local_binding): Likewise. (pop_label): Remove check for doing_semantic_analysis_p. (poplevel): Use "kind" field in binding_level, not the various flags. (set_block): Remove check for doing_semantic_analysis_p. (pushlevel_class): Use "kind" field in binding_level, not the various flags. (poplevel_class): Likewise. (initial_push_namespace_scope): Likewise. (maybe_push_to_top_level): Likewise. (set_identifier_type_value_with_scope): Likewise. (pop_everything): Likewise. (maybe_process_template_type_declaration): Likewise. (pushtag): Likewise. (pushdecl): Likewise. (pushdecl_with_scope): Likewise. (check_previous_goto_1): Likewise. (define_label): Likewise. (finish_case_label): Likewise. (lookup_tag): Likewise. (unqualified_namespace_lookup): Likewise. (lookup_name_real): Likewise. (lookup_name_current_level): Likewise. (lookup_type_current_level): Likewise. (record_builtin_type): Likewise. (cp_make_fname_decl): Likewise. (maybe_inject_for_scope_var): Likewise. (cp_finish_decl): Remove check for doing_semantic_analysis_p. (start_function): Use begin_scope, not pushlevel. (finish_function): Use "kind" field in binding_level, not the various flags. (start_method): Use begin_scope, not pushlevel. (make_label_decl): Do not check expanding_p. (save_function-data): Do not set expanding_p. (cxx_push_function_context): Do not clear expanding_p. * semantics.c (cxx_expand_function_start): Do not set expanding_p. PR c++/3907 * g++.dg/parse/template12.C: New test. * g++.dg/abi/bitfield11.C: New test. * g++.dg/abi/bitfield12.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71393 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/coverage.c')
-rw-r--r--gcc/coverage.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/coverage.c b/gcc/coverage.c
index 6facdce39f6..e6f4129dd79 100644
--- a/gcc/coverage.c
+++ b/gcc/coverage.c
@@ -854,19 +854,18 @@ create_coverage (void)
rest_of_decl_compilation (ctor, 0, 1, 0);
announce_function (ctor);
current_function_decl = ctor;
- DECL_INITIAL (ctor) = error_mark_node;
make_decl_rtl (ctor, NULL);
init_function_start (ctor);
- (*lang_hooks.decls.pushlevel) (0);
expand_function_start (ctor, 0);
-
/* Actually generate the code to call __gcov_init. */
gcov_info_address = force_reg (Pmode, XEXP (DECL_RTL (gcov_info), 0));
emit_library_call (gcov_init_libfunc, LCT_NORMAL, VOIDmode, 1,
gcov_info_address, Pmode);
expand_function_end ();
- (*lang_hooks.decls.poplevel) (1, 0, 1);
+ /* Create a dummy BLOCK. */
+ DECL_INITIAL (ctor) = make_node (BLOCK);
+ TREE_USED (DECL_INITIAL (ctor)) = 1;
rest_of_compilation (ctor);