diff --git a/.github/codecov.yml b/.github/codecov.yml index f8c332d0f0..b77661e638 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -39,3 +39,17 @@ ignore: - "dev_tools/**" - "tests/**" - "util/**" + # Sources produced by dev_tools/bin/gen-ifc-map. + - '^src/ifc_map\.h$' + - '^src/ifc_map_functions\.c$' + - '^src/ifc_map_functions\.h$' + - '^src/ifc_map_functions_acc\.c$' + - '^src/ifc_map_functions_dbg\.c$' + - '^src/ifc_map_functions_mut\.c$' + - '^src/ifc_map_functions_val\.c$' + - '^src/ifc_modules_inst\.h$' + - '^src/ifc_modules_spec\.h$' + # Large generated data tables. + - '^src/unicode_name_fsm\.c$' + - '^src/builtin_defs\.h$' + - '^src/builtin_kinds\.h$' diff --git a/src/attribute.c b/src/attribute.c index 66a81f25c0..e6775c2444 100644 --- a/src/attribute.c +++ b/src/attribute.c @@ -3762,6 +3762,7 @@ this is &scp.attributes.) } /* get_attribute_link */ #if DEBUG +/* GCOVR_EXCL_START */ void db_attribute(an_attribute_ptr ap) /* @@ -3916,6 +3917,7 @@ including (a) the string descr, (b) a rendering of the given attribute, and } /* if */ } /* db_log_attribute_action */ +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ #define db_log_attribute_action(descr, ap, entity, entity_kind) /*Nothing*/ @@ -4195,11 +4197,13 @@ produces *p_type. *p_type = new_type; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("trace_attributes")) { for (ap = attributes; ap != NULL; ap = ap->next) { db_log_attribute_action("attach", ap, (char*)new_type, iek_type); } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* attach_type_attributes */ @@ -8070,10 +8074,12 @@ multiversioning isn't applicable. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("trace_attributes")) { (void)fprintf(f_debug, "apply_target_attr: target=%s\n", aap->variant.token); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return result; } /* apply_target_attr */ @@ -8663,10 +8669,12 @@ STATIC_THREAD an_ELF_visibility_stack_entry_ptr stack, and available for reuse. */ #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_ELF_visibility_stack_entries_allocated; /* Number of ELF visibility stack entries allocated, to track total use of memory. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void push_ELF_visibility(an_ELF_visibility_kind evk, @@ -8685,7 +8693,9 @@ is TRUE if this "push" operation is for a namespace attribute. } else { entry = alloc_fe_of_type(an_ELF_visibility_stack_entry); #if DEBUG +/* GCOVR_EXCL_START */ ++num_ELF_visibility_stack_entries_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ entry->next = ELF_visibility_stack; @@ -10049,8 +10059,10 @@ STATIC_THREAD an_alias_fixup_ptr avail_alias_fixups; #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_alias_fixups_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -10072,7 +10084,9 @@ it will be pointed to by the aliased IL entry. } else { entry = (an_alias_fixup_ptr)alloc_fe(sizeof(an_alias_fixup)); #if DEBUG +/* GCOVR_EXCL_START */ ++num_alias_fixups_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Append the entry at the of the fixup list. */ @@ -10514,8 +10528,10 @@ will be made later on. #if REDEFINE_EXTNAME_PRAGMA_ENABLED #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long pragma_extname_string_space; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void redefine_extname_pragma(a_pending_pragma_ptr ppp) @@ -10558,7 +10574,9 @@ process_alias_fixup_list. /* Recreate the pragma string: "redefine_extname ". */ ppp->pragma_text = (char *)alloc_primary_file_scope_il(pragma_len); #if DEBUG +/* GCOVR_EXCL_START */ pragma_extname_string_space += pragma_len; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /*lint -e(668)*/(void)memcpy(ppp->pragma_text, "redefine_extname ", size_t_arg(prefix_len)); @@ -11043,7 +11061,9 @@ attributes. pch_saved_var_array_elem(ELF_visibility_stack), pch_saved_var_array_elem(avail_ELF_visibility_stack_entries), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_ELF_visibility_stack_entries_allocated), +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* GNU_VISIBILITY_ATTRIBUTE_ALLOWED */ pch_saved_var_array_elem(asm_name_map), @@ -11054,10 +11074,12 @@ attributes. pch_saved_var_array_elem(last_alias_fixup), pch_saved_var_array_elem(avail_alias_fixups), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_alias_fixups_allocated), #if REDEFINE_EXTNAME_PRAGMA_ENABLED pch_saved_var_array_elem(pragma_extname_string_space), #endif /* REDEFINE_EXTNAME_PRAGMA_ENABLED */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* GNU_EXTENSIONS_ALLOWED || REDEFINE_EXTNAME_PRAGMA_ENABLED */ #if USE_X86_FUNCTION_MULTIVERSIONING && DO_IL_LOWERING @@ -11107,7 +11129,9 @@ be initialized for each compilation. ELF_visibility_stack = NULL; avail_ELF_visibility_stack_entries = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_ELF_visibility_stack_entries_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* GNU_VISIBILITY_ATTRIBUTE_ALLOWED */ gnu_abi_tag_attribute_seen = FALSE; @@ -11116,10 +11140,12 @@ be initialized for each compilation. alias_fixup_list = NULL; last_alias_fixup = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_alias_fixups_allocated = 0; #if REDEFINE_EXTNAME_PRAGMA_ENABLED pragma_extname_string_space = 0; #endif /* REDEFINE_EXTNAME_PRAGMA_ENABLED */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* GNU_EXTENSIONS_ALLOWED || REDEFINE_EXTNAME_PRAGMA_ENABLED */ memzero((char*)attr_family_seen, sizeof(attr_family_seen)); @@ -11129,6 +11155,7 @@ be initialized for each compilation. #if GNU_EXTENSIONS_ALLOWED || REDEFINE_EXTNAME_PRAGMA_ENABLED #if DEBUG +/* GCOVR_EXCL_START */ unsigned long show_attribute_space_used(void) /* @@ -11155,6 +11182,7 @@ entities. return grand_total; } /* show_attribute_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* GNU_EXTENSIONS_ALLOWED || REDEFINE_EXTNAME_PRAGMA_ENABLED */ diff --git a/src/attribute.h b/src/attribute.h index 96ff727ea8..21efee1684 100644 --- a/src/attribute.h +++ b/src/attribute.h @@ -20,9 +20,11 @@ attribute.h -- Declarations related to attribute.c (having to do with BEGIN_EDG_NAMESPACE #if DEBUG +/* GCOVR_EXCL_START */ extern void db_attribute(an_attribute_ptr ap); extern void db_attribute_list(an_attribute_ptr ap); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if REDEFINE_EXTNAME_PRAGMA_ENABLED diff --git a/src/basics.h b/src/basics.h index e971bf29f9..1a305c42bf 100644 --- a/src/basics.h +++ b/src/basics.h @@ -686,6 +686,7 @@ BEGIN_EDG_NAMESPACE /* Conditionally open the "edg" namespace. */ #define DEBUG TRUE #endif /* ifndef DEBUG */ #if DEBUG +/* GCOVR_EXCL_START */ EXTERN_THREAD int debug_level; /* Debug level. 0 means no debug output, 1 - 5 @@ -712,6 +713,7 @@ extern void debug_exit(void); /* Macro that returns TRUE if the specified debug flag is set. */ #define db_flag_is_set(name) \ (db_active && debug_flag_is_set(name)) +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ /* If debugging code is not included: */ @@ -763,7 +765,9 @@ extern void debug_exit(void); determining whether two separately-compiled executables were built with compatible configuration options. */ #if DEBUG +/* GCOVR_EXCL_START */ #define DUMP_CONFIG_ENABLED TRUE /* Do not change this. */ +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ #define DUMP_CONFIG_ENABLED TRUE /* Okay to change this. */ #endif /* DEBUG */ diff --git a/src/c_gen_be.c b/src/c_gen_be.c index 644f356700..aeb42796d3 100644 --- a/src/c_gen_be.c +++ b/src/c_gen_be.c @@ -3276,6 +3276,7 @@ These two fields are normally consecutive members of the given "type", but #if CHECKING if (field->offset < rounded_after_field) { #if DEBUG +/* GCOVR_EXCL_START */ if (prev_field != NULL) { fprintf(f_debug, "curr field %s\n", prev_field->source_corresp.name); @@ -3285,6 +3286,7 @@ These two fields are normally consecutive members of the given "type", but } /* if */ fprintf(f_debug, "next offset %lu\n", (unsigned long)field->offset); fprintf(f_debug, "next alignment %lu\n", (unsigned long)alignment); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("field_padding: negative padding required"); } /* if */ @@ -5445,7 +5447,9 @@ type of the variable to which it refers. } /* if */ if (!types_match) { #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("check_type_of_variable_node: enk_variable has wrong type"); } /* if */ @@ -6463,7 +6467,9 @@ there's some possibility of precedence confusion and need_parens is TRUE. { a_type_ptr op2_type = skip_typerefs(operand_2->type); if (!il_identical_types(op2_type, expr_type)) { #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("dump_expr: bad type on eok_comma"); } /* if */ @@ -6574,7 +6580,9 @@ there's some possibility of precedence confusion and need_parens is TRUE. if (!il_identical_types(op2_type, expr_type) || !il_identical_types(op3_type, expr_type)) { #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("dump_expr: bad type on eok_question"); } /* if */ @@ -6855,7 +6863,9 @@ done_with_unary_operation:; #if CHECKING && !STANDALONE_UTILITY_PROGRAM if (operand_2 != NULL) { #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("dump_expr: unary operator has wrong # of operands"); } /* if */ @@ -6865,7 +6875,9 @@ done_with_binary_operation:; #if CHECKING && !STANDALONE_UTILITY_PROGRAM if (operand_2->next != NULL) { #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("dump_expr: binary operator has wrong # of operands"); } /* if */ @@ -6905,7 +6917,9 @@ done_with_binary_operation:; if (!il_identical_types(expr->type, expr->variant.object_lifetime.expr->type)) { #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("dump_expr: bad type on enk_object_lifetime"); } /* if */ @@ -11817,7 +11831,9 @@ must be redone for each generated C file. last_known_good_file = NULL; in_comment = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ annotate = db_active; +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ annotate = FALSE; #endif /* DEBUG */ @@ -12171,12 +12187,14 @@ from the primary source file name in the IL information. /* Scan options. There's a limited set, so we don't use getopt. */ switch (argv[optind][1]) { #if DEBUG +/* GCOVR_EXCL_START */ case 'd': /* Scan debug argument */ if (proc_debug_option(argv[optind]+2)) { command_line_error(ec_cl_error_in_debug_option_argument); } /* if */ break; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if !C_GEN_BE_GENERATES_ANSI_C case 'i': diff --git a/src/cfe.c b/src/cfe.c index b6536c6ce9..a432a9de8d 100644 --- a/src/cfe.c +++ b/src/cfe.c @@ -90,9 +90,11 @@ MAKE_FRONT_END_CALLABLE is TRUE. (including an internal error). */ f_error = default_error_output_file(); #if DEBUG +/* GCOVR_EXCL_START */ /* Initialize the file variable used for debug output. This should be done before anything else that could potentially produce debug output. */ f_debug = f_error; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Do early (before command-line processing) initialization. */ fe_early_init(); diff --git a/src/cfe_daemon.c b/src/cfe_daemon.c index a15e010404..cee7632eef 100644 --- a/src/cfe_daemon.c +++ b/src/cfe_daemon.c @@ -119,6 +119,7 @@ optional. } /* read_into_string */ #if DEBUG +/* GCOVR_EXCL_START */ static thread_local a_daemon_string trans_unit_tag; @@ -146,6 +147,7 @@ about an unused function when CHECKING is FALSE. return hash_ptr(a_string_view(str)); } /* hash_trans_unit_tag */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static thread_local int @@ -231,6 +233,7 @@ invocation ticket. /* Update the thread state. */ #if DEBUG +/* GCOVR_EXCL_START */ Opt opt_tu_tag = read_into_string(&reader); if (!opt_tu_tag.has_value()) { @@ -245,6 +248,7 @@ invocation ticket. hashing strategy for a_daemon_string. */ check_assertion(trans_unit_tag_hash == hash_trans_unit_tag(trans_unit_tag.as_temp_characters())); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ fd_thread_output = ticket->communication_fd; diff --git a/src/class_decl.c b/src/class_decl.c index 4e16b53c9f..c70b72708d 100644 --- a/src/class_decl.c +++ b/src/class_decl.c @@ -188,6 +188,7 @@ STATIC_THREAD a_class_fixup_ptr avail_class_fixup; #if DEBUG +/* GCOVR_EXCL_START */ /* Counters to track total use of memory. */ @@ -226,6 +227,7 @@ symbol table memory used. return grand_total; } /* db_show_class_fixups_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -246,7 +248,9 @@ initialize it. rfp = (a_routine_fixup_ptr)alloc_fe(sizeof(a_routine_fixup)); new (&rfp->function_body_token_cache) a_shared_token_cache(); #if DEBUG +/* GCOVR_EXCL_START */ num_routine_fixups_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Clear the entity. */ @@ -768,7 +772,9 @@ initialize it. /* Allocate memory for a new entity. */ cfp = (a_class_fixup_ptr)alloc_fe(sizeof(a_class_fixup)); #if DEBUG +/* GCOVR_EXCL_START */ num_class_fixups_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Clear the entity. */ @@ -839,6 +845,7 @@ STATIC_THREAD an_initializer_fixup_ptr reuse. */ #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_initializer_fixups_allocated; /* Number of initializer fixup entries allocated @@ -859,6 +866,7 @@ of the symbol table memory used. return grand_total; } /* db_show_initializer_fixups_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static an_initializer_fixup_ptr alloc_initializer_fixup(void) @@ -877,7 +885,9 @@ initialize it. /* Allocate memory for a new entity. */ ifp = alloc_fe_of_type(an_initializer_fixup); #if DEBUG +/* GCOVR_EXCL_START */ num_initializer_fixups_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Clear the entity. */ @@ -949,6 +959,7 @@ STATIC_THREAD an_override_registry_entry_ptr avail_override_registry_entries; #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_override_registry_entries_allocated; @@ -968,6 +979,7 @@ of the symbol table memory used. return grand_total; } /* db_show_override_registry_entries_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -987,7 +999,9 @@ fields. orep = (an_override_registry_entry_ptr)alloc_fe( sizeof(an_override_registry_entry)); #if DEBUG +/* GCOVR_EXCL_START */ num_override_registry_entries_allocated += 1; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Initialize its fields. */ @@ -1091,6 +1105,7 @@ STATIC_THREAD a_quasi_override_descr_ptr /* Available list of "quasi-override" descriptions. */ #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_quasi_override_descrs_allocated; @@ -1110,6 +1125,7 @@ as part of the symbol table memory used. return grand_total; } /* db_show_quasi_override_descrs_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -1134,7 +1150,9 @@ to by *p_list (which is NULL if the list is empty). Initialize the new entry qodp = (a_quasi_override_descr_ptr)alloc_fe(sizeof(a_quasi_override_descr)); #if DEBUG +/* GCOVR_EXCL_START */ num_quasi_override_descrs_allocated += 1; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Initialize its fields. */ @@ -1599,6 +1617,7 @@ STATIC_THREAD a_pending_exception_check_entry_ptr other declarations only after exception specifications are known to be established. */ #if DEBUG +/* GCOVR_EXCL_START */ /* Counter to track total use of memory. @@ -1618,6 +1637,7 @@ unsigned long db_show_pending_exception_check_entries_used( return grand_total; } /* db_show_pending_exception_check_entries_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static void record_pending_exception_check(a_symbol_ptr sym, @@ -1640,7 +1660,9 @@ record with the given information. pecp = (a_pending_exception_check_entry_ptr) alloc_fe(sizeof(a_pending_exception_check_entry)); #if DEBUG +/* GCOVR_EXCL_START */ ++num_pending_exception_check_entries; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ pecp->next = pending_exception_check_entries; @@ -1790,6 +1812,7 @@ STATIC_THREAD a_covariant_override_ptr /* Available list of covariant override entries. */ #if DEBUG +/* GCOVR_EXCL_START */ /* Counter to track total use of memory. @@ -1806,6 +1829,7 @@ unsigned long db_show_covariant_overrides_used(unsigned long grand_total) return grand_total; } /* db_show_covariant_overrides_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static void record_covariant_override(a_class_def_state_ptr cdsp, @@ -1826,7 +1850,9 @@ pointed to by cdsp. Initialize the record with the given information. } else { cop = (a_covariant_override_ptr)alloc_fe(sizeof(a_covariant_override)); #if DEBUG +/* GCOVR_EXCL_START */ ++num_covariant_overrides_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ cop->next = NULL; @@ -3154,11 +3180,13 @@ and for member functions of template classes. cssp->default_arg_fixup_pass_1_started = TRUE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fputs("default-arg fixup for class \"", f_debug); db_type_name(class_type); fputs("\"\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (class_type->variant.class_struct_union.is_template_class && class_type->variant.class_struct_union.is_nonreal_class) { @@ -3190,12 +3218,14 @@ and for member functions of template classes. definition. */ if (class_type->source_corresp.source_sequence_entry != NULL) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("forcing ss-entries for instantiations triggered ", f_debug); fputs("by default args to precede\n class \"", f_debug); db_type_name(class_type); fputs("\"\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Determine the scope into which instantiations will be inserted. It will be the innermost active namespace scope that is a parent @@ -3289,9 +3319,11 @@ and for member functions of template classes. function type. */ sym = rfp->symbol; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_symbol(sym, "scanning default args for ", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (fixup_class_is_nonreal_template_instantiation) { /* Prototype instantiation. */ @@ -3783,11 +3815,13 @@ nested class. #endif /* EXPENSIVE_CHECKING */ if (cssp->routine_fixup_list != NULL) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fputs("inline function fixup for class \"", f_debug); db_type_name(class_type); fputs("\"\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (class_type->variant.class_struct_union.is_template_class && class_type->variant.class_struct_union.is_nonreal_class) { @@ -3842,12 +3876,14 @@ nested class. sseocp = (a_src_seq_end_of_construct_ptr)tail->entity.ptr; if (sseocp->entity.ptr == (char *)class_type) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("adding fixup entries following body of class \"", f_debug); db_type_name(class_type); fputs("\"\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ insert_point = tail->next; break; @@ -3939,9 +3975,11 @@ nested class. a_boolean injected = symbol_is(sym, sk_member_function) && func_sym_routine(sym)->from_injected_tokens; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_symbol(sym, "scanning function body for ", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ is_friend = fixup_is_for_friend(rfp); if (!same_entities(curr_scope_class_type, rfp->class_type)) { @@ -5135,6 +5173,7 @@ after a class instantiation. #if DEBUG +/* GCOVR_EXCL_START */ static void db_virtual_function_override( an_overriding_virtual_function_ptr ovfp) /* @@ -5204,6 +5243,7 @@ Dump a sequence of virtual function numbers, for debug purposes. } /* for */ } /* if */ } /* db_virtual_function_number_sequence */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -5252,6 +5292,7 @@ ambiguity. scan the list to look for duplicate primary functions. */ ovfp = bcp->variant.overriding_virtual_functions; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { if (ovfp != NULL) { fprintf(f_debug, "vfnum sequence (base class %s of class %s): ", @@ -5261,6 +5302,7 @@ ambiguity. (void)fputc('\n', f_debug); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ while (ovfp != NULL) { /* Compare the primary function for the current overriding virtual @@ -5298,11 +5340,13 @@ ambiguity. ec_ambiguous_virtual_function_override, sym); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs(" vfnum sequence after pruning: ", f_debug); db_virtual_function_number_sequence(bcp); (void)fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Advance to the next entry on the list. */ @@ -5385,6 +5429,7 @@ for the class to which they belong. ovfp->next = new_ovfp; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("virtual function sequence for base class ", f_debug); db_type_name(base_class->type); @@ -5392,6 +5437,7 @@ for the class to which they belong. db_virtual_function_number_sequence(base_class); (void)fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* insert_in_virtual_function_override_list */ @@ -5526,12 +5572,14 @@ new_direct_bcp->derived_class. new_ovfp->return_adjustment_base_class = ovfp_to_copy->return_adjustment_base_class; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("copy for base class ", f_debug); db_type_name(new_bcp->type); fputs(": ", f_debug); db_virtual_function_override(ovfp_to_copy); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Add it to the new list. */ insert_in_virtual_function_override_list(new_bcp, new_ovfp); @@ -6206,19 +6254,23 @@ appears on a linked list pointed to from base_class. } /* if */ #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("existing entry: ", f_debug); db_virtual_function_override(ovfp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ovfp->overriding_function = overriding_func; ovfp->base_class = NULL; ovfp->return_adjustment_base_class = return_adjustment_bcp; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("after modification: ", f_debug); db_virtual_function_override(ovfp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* There can be more than one override entry from previous base classes in a case like this: @@ -6238,10 +6290,12 @@ appears on a linked list pointed to from base_class. while (ovfp->next != NULL && ovfp->next->primary_function == primary_func) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("removing: ", f_debug); db_virtual_function_override(ovfp->next); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ovfp->next = ovfp->next->next; } /* while */ @@ -6255,10 +6309,12 @@ appears on a linked list pointed to from base_class. ovfp->overriding_function = overriding_func; ovfp->return_adjustment_base_class = return_adjustment_bcp; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("newly created: ", f_debug); db_virtual_function_override(ovfp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ insert_in_virtual_function_override_list(base_class, ovfp); } /* if */ @@ -8210,6 +8266,7 @@ a pointer to it. #if DEBUG +/* GCOVR_EXCL_START */ void db_path(a_derivation_path path, a_boolean show_offset) /* @@ -8356,6 +8413,7 @@ Dump a linked list of base class entries, for debug purposes. } /* if */ } /* db_base_class_list */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if EXPENSIVE_CHECKING @@ -8432,18 +8490,22 @@ with class_state. db_enter(5, "verify_virt_func_override_list"); ovfp = base_class->variant.overriding_virtual_functions; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { if (ovfp != NULL) { fputs("base class = ", f_debug); db_base_class(base_class, /*show_offset=*/FALSE); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ for (; ovfp != NULL; ovfp = ovfp->next) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { db_virtual_function_override(ovfp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (ovfp->base_class == NULL) { /* The overriding function is in the derived class, which is only @@ -8478,12 +8540,14 @@ identical. db_enter(4, "congruent_paths"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("comparing ", f_debug); db_path(path1, /*show_offset=*/FALSE); fputs(" and ", f_debug); db_path(path2, /*show_offset=*/FALSE); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ congruent = FALSE; /* Only the start of a derivation and the end of a derivation can be @@ -8515,9 +8579,11 @@ identical. } /* for */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, " : %scongruent\n", congruent ? "" : "not "); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return congruent; @@ -9159,6 +9225,7 @@ duplicate paths. The copy will be a base class of new_class. classes list for the new class. No new base class entry needs to be created. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fputs(" reencountering virtual base class \"", f_debug); db_type_name(bcp->type); @@ -9166,6 +9233,7 @@ duplicate paths. The copy will be a base class of new_class. db_abbreviated_type(new_class); fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (access == as_public && directly_derived_bcp->has_public_derivation) { @@ -9177,6 +9245,7 @@ duplicate paths. The copy will be a base class of new_class. } /* for */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fputs(" creating indirect base class \"", f_debug); db_type_name(base_class_to_copy->type); @@ -9184,6 +9253,7 @@ duplicate paths. The copy will be a base class of new_class. db_abbreviated_type(new_class); fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Create a new base class entry. */ new_bcp = alloc_base_class(); @@ -10207,12 +10277,14 @@ to FALSE before returning). (a_derivation_step_ptr)NULL }, access); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_flag_is_set("base_specifiers")) { db_abbreviated_type(bcp_type); fputs(" is direct base class of ", f_debug); db_abbreviated_type(class_type); fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if CFRONT_OBJECT_CODE_COMPATIBILITY /* When cfront lays out a class with base classes, the subobject for the @@ -10293,11 +10365,13 @@ to FALSE before returning). if (!bcp->is_pack_expansion && bcp->variant.overriding_virtual_functions != NULL) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("copying virtual function override list from ", f_debug); db_base_class(bcp, FALSE); db_virtual_function_override_list(bcp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Copy the virtual function override entries from bcp (which is on the base classes list for bcp_type) to the @@ -10305,11 +10379,13 @@ to FALSE before returning). classes list for class_type). */ copy_virtual_function_override_list(bcp, new_bcp, direct_bcp); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("new base class ", f_debug); db_base_class(new_bcp, FALSE); db_virtual_function_override_list(new_bcp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* for */ @@ -10433,11 +10509,13 @@ can only contain CLI interfaces. db_enter(3, "scan_base_specifier_list"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_flag_is_set("base_specifiers")) { fputs("scanning base classes for ", f_debug); db_abbreviated_type(type_ptr); fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ scope_stack_top().in_base_specifier_list = TRUE; if (type_is(type_ptr, tk_union)) { @@ -11289,7 +11367,9 @@ implicitly as part of the dispose pattern implementation. source_sequence_entry; if (ssep != NULL && ssep->next != NULL) { #if DEBUG +/* GCOVR_EXCL_START */ a_source_sequence_entry_ptr prev = ssep->prev; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Unlink the source sequence entry for the current class and @@ -11297,6 +11377,7 @@ implicitly as part of the dispose pattern implementation. move_src_seq_entry(ssep, depth_scope_stack, (a_source_sequence_entry_ptr)NULL, depth_scope_stack); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full") || db_flag_is_set("base_specifiers")) { @@ -11307,6 +11388,7 @@ implicitly as part of the dispose pattern implementation. prev->next : scope_stack[depth_scope_stack].source_sequence_list); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -11314,9 +11396,11 @@ implicitly as part of the dispose pattern implementation. #endif /* GENERATE_SOURCE_SEQUENCE_LISTS */ class_symbol_supp(symbol_for(type_ptr))->base_classes_fixed = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_flag_is_set("base_specifiers")) { db_base_class_list(type_ptr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if EXPENSIVE_CHECKING if (!type_is(type_ptr, tk_union) && @@ -11473,6 +11557,7 @@ information (if available; it may be NULL). ctsp->friends = ielep; } #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("friendship", class_type, iek_type) || db_trace("friendship", friend_class_type, iek_type)) { db_abbreviated_type(friend_class_type); @@ -11492,6 +11577,7 @@ information (if available; it may be NULL). extra_info->friends); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ #if GENERATE_SOURCE_SEQUENCE_LISTS @@ -12007,6 +12093,7 @@ that the lexical class of the definition can be recovered. rlep->next = ctsp->friends; ctsp->friends = rlep; #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("friendship", rout_ptr, iek_routine) || db_trace("friendship", class_type, iek_type)) { db_name_full(&rout_ptr->source_corresp, iek_routine); @@ -12020,6 +12107,7 @@ that the lexical class of the definition can be recovered. db_class_list(rout_befriending_classes(rout_ptr)); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* update_friend_function_info */ @@ -17172,7 +17260,9 @@ implicitly declared member functions. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) db_symbol(sym, "", 4); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ treat_declaration_as_okay_in_property_or_event(class_state); db_exit(); @@ -19569,7 +19659,9 @@ template declaration and is NULL otherwise. curr_routine_fixup->symbol = sym; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) db_symbol(sym, "", 4); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* decl_static_data_member */ @@ -19801,9 +19893,11 @@ be the last in the anonymous-union-parent chain. } /* for */ if (new_apo_sym == NULL) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { db_symbol(apo_sym, "cloning: ", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* None was found, so create a new one. */ new_apo_sym = make_anonymous_parent_object_symbol((a_symbol_kind)sk_field, @@ -20045,6 +20139,7 @@ nonstandard anonymous unions is_nonstd is TRUE. "check_anonymous_union_symbols: bad symbol kind"); } /* switch */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("adding symbols to ", f_debug); if (class_type != NULL) { @@ -20056,6 +20151,7 @@ nonstandard anonymous unions is_nonstd is TRUE. db_abbreviated_type(assoc_object_type); db_symbol(assoc_object_sym, ":\n ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (reuse_symbol && !C_mode() && !is_nonstd) { ctsp = assoc_object_type->variant.class_struct_union.extra_info; @@ -20131,10 +20227,12 @@ nonstandard anonymous unions is_nonstd is TRUE. next_sym = sym->next_in_scope; if (reuse_symbol) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { db_symbol(sym, (char *)(is_function_symbol(sym) ? "discarding: " : "promoting: "), 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Disjoin the symbol from the list. It will be added to another list when it is reentered in the symbol table. */ @@ -20153,9 +20251,11 @@ nonstandard anonymous unions is_nonstd is TRUE. } /* if */ } else { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { db_symbol(sym, "cloning: ", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Creation of a new symbol is only implemented for fields, because it can only happen in C mode or with C++ classes that have no C++ @@ -20311,6 +20411,7 @@ nonstandard anonymous unions is_nonstd is TRUE. "check_anonymous_union_symbols: unexpected sym kind"); } /* switch */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { if (is_function_symbol(sym)) { /* Nothing. */ @@ -20320,6 +20421,7 @@ nonstandard anonymous unions is_nonstd is TRUE. db_symbol(sym, "new symbol: ", 2); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ /* Just to be safe, clear the next pointers on any anonymous union parent @@ -21947,11 +22049,13 @@ be entered. } /* if */ class_state->is_first_field = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { if (member_sym != NULL) { db_symbol(member_sym, "", 2); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return field; @@ -26165,6 +26269,7 @@ destination type is not yet on the current class's conversion list. assoc_pointers_block_of(&scope_stack[depth_scope_stack])->symbols; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { a_class_symbol_supplement_ptr cssp = symbol_supplement_for_class(class_type); @@ -26184,6 +26289,7 @@ destination type is not yet on the current class's conversion list. db_symbol(slep->symbol, " ", 4); } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* project_base_class_conversion_functions */ @@ -27251,6 +27357,7 @@ are: A for A, A::B for A::B, and A::B::C for A::B::C. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { if (corresp_prototype_tag_sym != NULL) { fputs("returning symbol for ", f_debug); @@ -27258,6 +27365,7 @@ are: A for A, A::B for A::B, and A::B::C for A::B::C. fputc('\n', f_debug); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return corresp_prototype_tag_sym; @@ -32996,12 +33104,14 @@ wrap_up_class_definition. record where it was defined, not where it was initially declared. */ move_to_end_of_types_list(class_type, effective_decl_level); #if DEBUG +/* GCOVR_EXCL_START */ } else { if (db_flag_is_set("dump_type_lists")) { fprintf(f_debug, "Not moving to end of type list: "); db_abbreviated_type(class_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -36353,11 +36463,13 @@ have been processed. #endif /* MAINTAIN_NEEDED_FLAGS */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fputs("external linkage given to member function \"", f_debug); db_name(&rp->source_corresp); fputs("\"\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ check_type_for_linkage_change(rp->type, count); @@ -36433,11 +36545,13 @@ are entailed in its definition and marks them external as well. (*count)++; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fputs("external linkage given to class \"", f_debug); db_type_name(type); fputs("\"\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Be sure any class types involved in the definitions of subobjects of the class are marked external, too. */ @@ -36474,11 +36588,13 @@ are entailed in its definition and marks them external as well. vp->storage_class = (a_storage_class)sc_extern; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fputs("external linkage given to static data member \"", f_debug); db_name(&vp->source_corresp); fputs("\"\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_type_for_linkage_change(vp->type, count); } /* if */ @@ -36753,11 +36869,13 @@ because they were used in declaring an external function or variable. continue; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fputs("file scope type: ", f_debug); db_abbreviated_type(tp); fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (is_immediate_class_type(tp)) { /* Found a class. */ @@ -36903,6 +37021,7 @@ One-time initialization for class_decl.c static variables. pch_saved_var_array_elem(deferred_friend_fixup_list_tail), pch_saved_var_array_elem(use_deferred_friend_fixup_list), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_routine_fixups_allocated), pch_saved_var_array_elem(num_class_fixups_allocated), pch_saved_var_array_elem(num_override_registry_entries_allocated), @@ -36911,6 +37030,7 @@ One-time initialization for class_decl.c static variables. pch_saved_var_array_elem(num_quasi_override_descrs_allocated), #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ pch_saved_var_array_elem(num_pending_exception_check_entries), +/* GCOVR_EXCL_STOP */ #endif /* if DEBUG */ pch_saved_var_array_terminating_elem() }; @@ -36965,10 +37085,13 @@ Initializations for class declaration processing. #if IA64_ABI avail_covariant_overrides = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_covariant_overrides_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* IA64_ABI */ #if DEBUG +/* GCOVR_EXCL_START */ num_routine_fixups_allocated = 0; num_class_fixups_allocated = 0; num_override_registry_entries_allocated = 0; @@ -36977,6 +37100,7 @@ Initializations for class declaration processing. num_quasi_override_descrs_allocated = 0; #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ num_pending_exception_check_entries = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ abbr_mem_func_templates = alloc_fe_of_type(an_abbr_mem_func_templ_map); construct(abbr_mem_func_templates, /*mask_width=*/10u); diff --git a/src/class_decl.h b/src/class_decl.h index efa2e18c96..8f448bc005 100644 --- a/src/class_decl.h +++ b/src/class_decl.h @@ -473,6 +473,7 @@ void synth_class_definition(a_type_ptr class_type, #if DEBUG +/* GCOVR_EXCL_START */ extern unsigned long db_show_routine_fixups_used(unsigned long grand_total); extern unsigned long db_show_class_fixups_used(unsigned long grand_total); @@ -507,6 +508,7 @@ extern void db_base_class(a_base_class_ptr bcp, extern void db_base_class_list(a_type_ptr tp); extern void db_all_virtual_function_override_lists(a_type_ptr class_type); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Conditionally close the "edg" namespace. */ diff --git a/src/cmd_line.c b/src/cmd_line.c index a1fc4154cb..739556a1fb 100644 --- a/src/cmd_line.c +++ b/src/cmd_line.c @@ -203,8 +203,10 @@ is FALSE an error will be issued if the option is used. if (option_description_number == SIZE_OF_OPTION_DESCRIPTIONS) { /* There are more entries than fit in the array. */ #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "Too many options descriptions. Current limit is %d\n", SIZE_OF_OPTION_DESCRIPTIONS); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition(); } else { @@ -427,6 +429,7 @@ Initialize the option information table. pchek_command_line); #endif /* BACK_END_IS_C_GEN_BE */ #if DEBUG +/* GCOVR_EXCL_START */ add_option_description(optk_debug, "db", 'd', /*value=*/TRUE, /*arg_required=*/TRUE, pchek_none); @@ -438,6 +441,7 @@ Initialize the option information table. /*value=*/TRUE, /*arg_required=*/TRUE, pchek_none); #endif /* MAINTAIN_ALLOCATION_SEQUENCE_NUMBER */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if !EDG_WIN32 && !MULTIPLE_THREAD_COMPILATION /* This option is only available on Unix and only works at the process @@ -2299,9 +2303,11 @@ processing routine to update the severity. char *opt_end = strchr(ptr, '\0'); a_boolean err; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Setting error severity for: %s\n", opt_start); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (isdigit((unsigned char)*opt_start)) { int error_number; @@ -2492,7 +2498,9 @@ STATIC_THREAD a_flag_name { "stack_referenced_include_directories", &stack_referenced_include_directories }, #if DEBUG +/* GCOVR_EXCL_START */ { "space_used", &display_space_used }, +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ { "use_nonstd_partial_ordering", &use_nonstd_partial_ordering }, { "no_checking_pragmas", &no_checking_pragmas }, @@ -11039,6 +11047,7 @@ Process the arguments on the command line that invoked the compiler. break; #endif /* BACK_END_IS_C_GEN_BE */ #if DEBUG +/* GCOVR_EXCL_START */ case optk_debug: /* Set debug level. */ if (proc_debug_option(opt_arg)) { @@ -11060,6 +11069,7 @@ Process the arguments on the command line that invoked the compiler. } /* if */ break; #endif /* MAINTAIN_ALLOCATION_SEQUENCE_NUMBER */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if !EDG_WIN32 && !MULTIPLE_THREAD_COMPILATION case optk_time_limit: @@ -13065,8 +13075,10 @@ Process the arguments on the command line that invoked the compiler. error_file_name, /*binary_file=*/FALSE, /*update_mode=*/FALSE, OFF_COMMAND_LINE, ec_error); #if DEBUG +/* GCOVR_EXCL_START */ /* Direct debug output to the new error output file. */ f_debug = f_error; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ if (option_kind_used[(int)optk_generate_raw_listing]) { @@ -13231,7 +13243,9 @@ variables declared in cmd_line.h. allow_nonconst_call_anachronism = DEFAULT_ALLOW_NONCONST_CALL_ANACHRONISM; assignment_to_this_allowed = ASSIGNMENT_TO_THIS_ALLOWED; #if DEBUG +/* GCOVR_EXCL_START */ init_debug_level = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ do_preprocessing_only = FALSE; pp_output_file_needed = FALSE; @@ -13639,7 +13653,9 @@ variables declared in cmd_line.h. no_checking_pragmas = FALSE; no_find_pragma_validation = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ display_space_used = FALSE; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if IA64_ABI emulate_gnu_abi_bugs = DEFAULT_EMULATE_GNU_ABI_BUGS; diff --git a/src/cmd_line.h b/src/cmd_line.h index 3c10c68899..8f30caf084 100644 --- a/src/cmd_line.h +++ b/src/cmd_line.h @@ -95,7 +95,9 @@ enum an_option_kind { optk_module_list_for_union_init, #endif /* !BACK_END_IS_C_GEN_BE */ #if DEBUG +/* GCOVR_EXCL_START */ optk_debug, +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ optk_time_limit, optk_diag_suppress, @@ -248,10 +250,12 @@ enum an_option_kind { optk_strict_gnu, #endif /* GNU_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ optk_debug_name, #if MAINTAIN_ALLOCATION_SEQUENCE_NUMBER optk_debug_alloc_seq, #endif /* MAINTAIN_ALLOCATION_SEQUENCE_NUMBER */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ optk_long_long, optk_context_limit, @@ -437,10 +441,12 @@ EXTERN_THREAD a_boolean is ASSIGNMENT_TO_THIS_ALLOWED. */ #if DEBUG +/* GCOVR_EXCL_START */ EXTERN_THREAD int init_debug_level; /* Initial debug level: n in -dn option, or 0 by default. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ EXTERN_THREAD a_boolean do_preprocessing_only; @@ -2567,10 +2573,12 @@ EXTERN_THREAD a_boolean #if DEBUG +/* GCOVR_EXCL_START */ EXTERN_THREAD a_boolean display_space_used; /* TRUE if the space used information should be shown at the end of compilation. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if IA64_ABI diff --git a/src/const_ints.c b/src/const_ints.c index d17e4ea14a..612bf8d4eb 100644 --- a/src/const_ints.c +++ b/src/const_ints.c @@ -2387,6 +2387,7 @@ final null character). } /* f_unsigned_to_string_buf */ #if DEBUG +/* GCOVR_EXCL_START */ a_number_buffer db_format_integer_value(an_integer_value *value) /* @@ -2420,6 +2421,7 @@ Print a signed integer value representation in decimal form. value, /*is_signed=*/TRUE, &host_val, &err); (void)fprintf(f_debug, "%ld %s\n", (long)host_val, err ? "(Error)" : ""); } /* db_signed_integer_value */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ diff --git a/src/const_ints.h b/src/const_ints.h index 7b77f52c65..f2585f6cee 100644 --- a/src/const_ints.h +++ b/src/const_ints.h @@ -359,9 +359,11 @@ extern an_integer_kind int_kind_for_bit_size(unsigned int number_of_bits, #endif /* MICROSOFT_EXTENSIONS_ALLOWED || GNU_EXTENSIONS_ALLOWED || IA64_ABI */ #if DEBUG +/* GCOVR_EXCL_START */ extern a_number_buffer db_format_integer_value(an_integer_value *value); extern void db_signed_integer_value(an_integer_value *value); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* diff --git a/src/cp_gen_be.c b/src/cp_gen_be.c index 9b0fde6249..6dc7632f1a 100644 --- a/src/cp_gen_be.c +++ b/src/cp_gen_be.c @@ -26847,12 +26847,14 @@ from the primary source file name in the IL information. /* Scan options. There's a limited set, so we don't use getopt. */ switch (argv[optind][1]) { #if DEBUG +/* GCOVR_EXCL_START */ case 'd': /* Scan debug argument */ if (proc_debug_option(argv[optind]+2)) { command_line_error(ec_cl_error_in_debug_option_argument); } /* if */ break; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ default: str_command_line_error(ec_cl_invalid_option, argv[optind]); diff --git a/src/debug.c b/src/debug.c index 9f215305d0..8c789ad5a9 100644 --- a/src/debug.c +++ b/src/debug.c @@ -23,6 +23,7 @@ debug.c -- Debug routines. /* The #if here is done after the inclusion of basics.h because basics.h may set DEBUG. */ #if DEBUG +/* GCOVR_EXCL_START */ #include "fe_common.h" @@ -829,6 +830,7 @@ must not make use of anything initialized there. /* Conditionally close the "edg" namespace. */ END_EDG_NAMESPACE +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ diff --git a/src/debug.h b/src/debug.h index c4d0223c95..6b2a4a40d8 100644 --- a/src/debug.h +++ b/src/debug.h @@ -16,6 +16,7 @@ debug.h -- Declarations related to debugging. #define DEBUG_H 1 #if DEBUG +/* GCOVR_EXCL_START */ /* Conditionally open the "edg" namespace. */ BEGIN_EDG_NAMESPACE @@ -166,6 +167,7 @@ Return TRUE if a db flag is set for colorization. } /* db_color_flag_is_set */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Conditionally close the "edg" namespace. */ diff --git a/src/decl_inits.c b/src/decl_inits.c index c077697a93..6e9380557d 100644 --- a/src/decl_inits.c +++ b/src/decl_inits.c @@ -6345,6 +6345,7 @@ returned set to TRUE. } /* if */ #endif /* CHECKING */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_flag_is_set("dump_init")) { if (!var_err) { fputs("initializer for ", f_debug); @@ -6357,6 +6358,7 @@ returned set to TRUE. #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* initializer */ @@ -6570,6 +6572,7 @@ expressions. For the latter, see init_capture_initializer below.) field->initializer_range.end = curr_construct_end_position; #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_init")) { fputs("initializer for field ", f_debug); db_name(&field->source_corresp); @@ -6581,6 +6584,7 @@ expressions. For the latter, see init_capture_initializer below.) fputs(")\n", f_debug); #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } else { @@ -7344,11 +7348,13 @@ FALSE is returned) for non-class objects. err_pos, (a_decl_pos_block_ptr)NULL, (a_statement_ptr *)NULL); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_flag_is_set("dump_init")) { db_variable(var); fputs(",\n", f_debug); db_initializer(var, 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ if (sym->kind == (a_symbol_kind)sk_static_data_member) { @@ -7376,11 +7382,13 @@ FALSE is returned) for non-class objects. err_pos, (a_decl_pos_block_ptr)NULL, (a_statement_ptr *)NULL); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_flag_is_set("dump_init")) { fputs("Default-initialized VLA: ", f_debug); db_variable(var); fputs("\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else if (is_reflection_type(tp)) { /* Default-initialization for reflection types is zero-initialization. */ @@ -10230,6 +10238,7 @@ initialized. These are addressed in the course of the processing. } /* if */ #endif /* NEW_CAN_BE_FOLDED_INTO_CTOR */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_flag_is_set("dump_init")) { db_symbol((a_symbol_ptr)ctor_rout->source_corresp.assoc_info, "constructor: ", 2); @@ -10251,6 +10260,7 @@ initialized. These are addressed in the course of the processing. } /* if */ } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ done: db_exit(); @@ -10757,6 +10767,7 @@ though neither constructors nor initialization is involved here.) } #endif /* DELETE_CAN_BE_FOLDED_INTO_DTOR */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_flag_is_set("dump_init")) { db_symbol(symbol_for(dtor_rout), "destructor: ", 2); for (cip = cip_list; cip != NULL; cip = cip->next) { @@ -10776,6 +10787,7 @@ though neither constructors nor initialization is involved here.) } /* if */ } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return cip_list; diff --git a/src/decl_spec.c b/src/decl_spec.c index 7021497aef..58c6ba819a 100644 --- a/src/decl_spec.c +++ b/src/decl_spec.c @@ -5081,12 +5081,14 @@ defined. Detailed position information is recorded in *decl_pos_block. dpsp->identifier_range = local_decl_pos_block.identifier_range; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (delayed_nested_class_def) { if (debug_level >= 3 || db_flag_is_set("dump_decl_pos_info")) { fprintf(f_debug, "decl-pos info for delayed nested class def\n"); db_decl_pos_info(tag_sym); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -5182,9 +5184,11 @@ defined. Detailed position information is recorded in *decl_pos_block. done: #endif /* MICROSOFT_EXTENSIONS_ALLOWED || SUN_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_symbol(tag_sym, "tag_sym: ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ dps->sym = tag_sym; db_exit(); @@ -5987,11 +5991,13 @@ is updated to reflect relevant positions of this definition. } else { #if GENERATE_SOURCE_SEQUENCE_LISTS #if DEBUG +/* GCOVR_EXCL_START */ if (!source_sequence_entries_disallowed && (debug_level >= 4 || db_flag_is_set("dump_ss_full"))) { fprintf(f_debug, "enum_specifier: empty ss entry for \"%s\":\n", locator_for_curr_id.symbol_header->identifier); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ enum_con_ssep = add_empty_source_sequence_entry(); #endif /* GENERATE_SOURCE_SEQUENCE_LISTS */ @@ -13553,6 +13559,7 @@ corresponding change in prescan_decl_specifiers (in disambig.c). if (err || declares_something) *output_flags |= DSO_DECLARES_SOMETHING; if (defines_something) *output_flags |= DSO_DEFINES_SOMETHING; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fputs("type_ptr: ", f_debug); if (*type_ptr == NULL) { @@ -13562,6 +13569,7 @@ corresponding change in prescan_decl_specifiers (in disambig.c). } /* if */ (void)fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ state->storage_class = state->declared_storage_class; state->decl_specifiers_error = err; diff --git a/src/declarator.c b/src/declarator.c index f373caf99b..306aef576f 100644 --- a/src/declarator.c +++ b/src/declarator.c @@ -545,11 +545,13 @@ array-to-pointer decay). } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fputs("declared type: ", f_debug); db_type(declared_type); fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return declared_type; @@ -908,6 +910,7 @@ the specifiers and declarator that formed the new type. db_enter(3, "add_to_derived_type_list"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("declarators")) { fprintf(f_debug, "At start of add_to_derived_type_list:\n"); fprintf(f_debug, " new_type_ptr = "); @@ -920,6 +923,7 @@ the specifiers and declarator that formed the new type. db_type(*bottom_derived_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Note that while derived types are being built up, the derived-type entries are connected to one another from the top down, which @@ -1315,6 +1319,7 @@ the specifiers and declarator that formed the new type. *bottom_derived_type = find_bottom_of_type(*bottom_derived_type); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "At end of add_to_derived_type_list:\n"); fprintf(f_debug, " new_type_ptr = "); @@ -1327,6 +1332,7 @@ the specifiers and declarator that formed the new type. if (*bottom_derived_type != NULL) db_type(*bottom_derived_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* add_to_derived_type_list */ @@ -3660,6 +3666,7 @@ an error if a default argument expression is encountered. be a function definition, it will be needed (in C++ unnamed parameters are allowed). */ #if DEBUG +/* GCOVR_EXCL_START */ if (!source_sequence_entries_disallowed && (debug_level >= 4 || db_flag_is_set("dump_ss_full"))) { if (!is_error_locator(param_locator)) { @@ -3668,6 +3675,7 @@ an error if a default argument expression is encountered. param_locator.symbol_header->identifier); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ param_state.source_sequence_entry = add_empty_source_sequence_entry(); @@ -6221,6 +6229,7 @@ Microsoft extended decl modifiers are also scanned, but they are ignored /* Keep looping as long as there are pointer declarators. */ } /* for */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { if (!same_entities(complete_type, specifiers_type)) { fputs("pointer/reference type: ", f_debug); @@ -6228,6 +6237,7 @@ Microsoft extended decl modifiers are also scanned, but they are ignored (void)fputc('\n', f_debug); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if MICROSOFT_EXTENSIONS_ALLOWED || NEAR_AND_FAR_ALLOWED /* Return unbound qualifiers to the caller. */ @@ -7856,6 +7866,7 @@ etc.). check_assertion(locator != NULL); #if GENERATE_SOURCE_SEQUENCE_LISTS #if DEBUG +/* GCOVR_EXCL_START */ if (!source_sequence_entries_disallowed && (debug_level >= 4 || db_flag_is_set("dump_ss_full"))) { fprintf(f_debug, "declarator: empty ss entry for \"%s\":\n", @@ -7863,6 +7874,7 @@ etc.). locator_for_curr_id.symbol_header->identifier : token_names[(int)curr_token]); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ *declarator_ssep = add_empty_source_sequence_entry(); #endif /* GENERATE_SOURCE_SEQUENCE_LISTS */ @@ -8658,6 +8670,7 @@ etc.). *p_complete_type = complete_type; *p_bottom_derived_type = bottom_derived_type; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fputs("complete_type: ", f_debug); if (complete_type == NULL) { @@ -8667,6 +8680,7 @@ etc.). } /* if */ (void)fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* r_declarator */ diff --git a/src/decls.c b/src/decls.c index 6916c90263..9baaa10fcd 100644 --- a/src/decls.c +++ b/src/decls.c @@ -351,8 +351,10 @@ STATIC_THREAD a_decl_parse_state_ptr /* Pointer to state entries available for reuse. */ #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_decl_parse_states_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -370,7 +372,9 @@ return a pointer to it. } else { dps = alloc_fe_of_type(a_decl_parse_state); #if DEBUG +/* GCOVR_EXCL_START */ ++num_decl_parse_states_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ init_decl_parse_state(dps); @@ -466,8 +470,10 @@ STATIC_THREAD a_decl_parse_callback_ptr /* Pointer to callback entries available for reuse. */ #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_decl_parse_callbacks_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -489,7 +495,9 @@ performed for declarations associated with subsequent secondary declarators. } else { entry = alloc_fe_of_type(a_decl_parse_callback); #if DEBUG +/* GCOVR_EXCL_START */ ++num_decl_parse_callbacks_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ entry->callback_fn = fn; @@ -576,8 +584,10 @@ STATIC_THREAD an_auto_param_descr_ptr available for reuse. */ #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_auto_param_descriptions_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -600,7 +610,9 @@ preceding the "auto" token (NULL if none). } else { entry = alloc_fe_of_type(an_auto_param_descr); #if DEBUG +/* GCOVR_EXCL_START */ ++num_auto_param_descriptions_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ entry->next = dps->variant.auto_params; @@ -3971,6 +3983,7 @@ when the declaration is a friend declaration within a class. } /* if */ done:; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { if (idlbp->linked_symbol != NULL) { db_symbol(idlbp->linked_symbol, "linked symbol: ", 2); @@ -3986,6 +3999,7 @@ done:; "prior decl in enclosing scope: ", 2); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* find_linked_symbol */ @@ -4254,6 +4268,7 @@ information in the specified id-linkage block. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "Linkage for %s is ", is_error_locator(*idlbp->locator) ? @@ -4267,6 +4282,7 @@ information in the specified id-linkage block. } /* switch */ putc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (idlbp->linkage == idl_none) { /* If there's no linkage, be sure the linked_symbol is NULL. */ @@ -8037,9 +8053,11 @@ for use in generating cross-reference output describing this declaration. depth_innermost_namespace_scope = saved_depth_innermost_namespace_scope; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_symbol(sym, "", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* decl_variable */ @@ -10865,9 +10883,11 @@ skip_overloading:; depth_innermost_namespace_scope = saved_depth_innermost_namespace_scope; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_symbol(sym, "", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* decl_routine */ @@ -11780,9 +11800,11 @@ definition of a member function of a class template. /* Return the function template symbol. */ *symbol_ptr = sym; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_symbol(sym, "", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* decl_function_template */ @@ -12111,9 +12133,11 @@ the symbol through dps->sym and its linkage (which is always "none") through *linkage_ptr = idl_none; dps->sym = sym; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_symbol(sym, "", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* define_static_data_member */ @@ -12976,9 +13000,11 @@ symbol entry, and return a pointer to it in state->sym. declaration. */ process_curr_construct_pragmas(sym, (a_statement_ptr)NULL); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_symbol(state->sym, "", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* decl_typedef */ @@ -13094,9 +13120,11 @@ symbol has already been entered as an undefined symbol. #endif /* GENERATE_SOURCE_SEQUENCE_LISTS */ switch_back_to_original_region(region_to_switch_back_to); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_symbol(dps.sym, "", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* decl_default_function */ @@ -13195,9 +13223,11 @@ is being scanned as part of a GNU local label declaration. copy_source_position(start_pos, error_position); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_symbol(label_sym, "", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return(label_sym->variant.label.ptr); @@ -15989,10 +16019,12 @@ it's a definition and NULL otherwise). } /* if */ #if GENERATE_SOURCE_SEQUENCE_LISTS #if DEBUG +/* GCOVR_EXCL_START */ if (!source_sequence_entries_disallowed && (debug_level >= 4 || db_flag_is_set("dump_ss_full"))) { fputs("namespace_declaration: adding empty ss entry\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ { /* Namespace entries are always allocated in file scope memory. Any source sequence entry pointing to it must therefore also be allocated @@ -17956,10 +17988,12 @@ prototype scope associated with func_info to the current scope. if (tail->next == NULL) break; } /* for */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("declaration: moving ss list from func info to curr scope\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Append the list to the list for the current scope. */ insert_src_seq_list(head, tail, depth_scope_stack, @@ -20293,12 +20327,14 @@ if one is present. } /* if */ #if EXTRA_SOURCE_POSITIONS_IN_IL #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_flag_is_set("dump_decl_pos_info")) { if (is_variable_def && is_static_data_member) { fprintf(f_debug, "decl-pos info for static data member def\n"); db_decl_pos_info(state->sym); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ copy_source_position(locator->source_position, error_position); @@ -23056,9 +23092,11 @@ Do one-time initialization of static variables defined in this file. pch_saved_var_array_elem(avail_decl_parse_callbacks), pch_saved_var_array_elem(avail_auto_param_descriptions), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_decl_parse_states_allocated), pch_saved_var_array_elem(num_decl_parse_callbacks_allocated), pch_saved_var_array_elem(num_auto_param_descriptions_allocated), +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pch_saved_var_array_terminating_elem() }; @@ -23076,9 +23114,11 @@ initialization for each compilation. */ { #if DEBUG +/* GCOVR_EXCL_START */ num_decl_parse_states_allocated = 0; num_decl_parse_callbacks_allocated = 0; num_auto_param_descriptions_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ avail_decl_parse_states = NULL; avail_decl_parse_callbacks = NULL; @@ -23087,6 +23127,7 @@ initialization for each compilation. } /* decls_init */ #if DEBUG +/* GCOVR_EXCL_START */ unsigned long show_decl_space_used(void) /* @@ -23113,6 +23154,7 @@ entities. return grand_total; } /* show_decl_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Conditionally close the "edg" namespace. */ diff --git a/src/decls.h b/src/decls.h index cd7f3ffed9..fdec6e73f8 100644 --- a/src/decls.h +++ b/src/decls.h @@ -2080,7 +2080,9 @@ extern void decls_trans_unit_init(void); extern void decls_init(void); #if DEBUG +/* GCOVR_EXCL_START */ unsigned long show_decl_space_used(void); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Conditionally close the "edg" namespace. */ diff --git a/src/def_arg.c b/src/def_arg.c index b5bde36639..f10e178c8f 100644 --- a/src/def_arg.c +++ b/src/def_arg.c @@ -31,6 +31,7 @@ STATIC_THREAD a_def_arg_expr_fixup_ptr #if DEBUG +/* GCOVR_EXCL_START */ /* Counter to track use of memory. */ @@ -50,6 +51,7 @@ entries, for debugging purposes. Also return the total amount. return grand_total; } /* db_show_def_arg_expr_fixups_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static a_def_arg_expr_fixup_ptr alloc_def_arg_expr_fixup(void) @@ -68,7 +70,9 @@ entry and initialize it. /* Allocate memory for a new entity. */ daefp = (a_def_arg_expr_fixup_ptr)alloc_fe(sizeof(a_def_arg_expr_fixup)); #if DEBUG +/* GCOVR_EXCL_START */ num_def_arg_expr_fixups_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Clear the entity. */ @@ -458,7 +462,9 @@ One-time initialization for def_arg.c static variables. STATIC_THREAD a_pch_saved_variable saved_vars[] = { pch_saved_var_array_elem(avail_def_arg_expr_fixup), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_def_arg_expr_fixups_allocated), +/* GCOVR_EXCL_STOP */ #endif /* if DEBUG */ pch_saved_var_array_terminating_elem() }; @@ -475,7 +481,9 @@ Initializations for class declaration processing. /* Initialize the list of freed delayed-scan-fixup entries. */ avail_def_arg_expr_fixup = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_def_arg_expr_fixups_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return; } /* def_arg_init */ diff --git a/src/def_arg.h b/src/def_arg.h index 9dfb5a9bef..eb5493f95e 100644 --- a/src/def_arg.h +++ b/src/def_arg.h @@ -99,8 +99,10 @@ extern void def_arg_one_time_init(void); extern void def_arg_init(void); #if DEBUG +/* GCOVR_EXCL_START */ extern unsigned long db_show_def_arg_expr_fixups_used( unsigned long grand_total); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Conditionally close the "edg" namespace. */ diff --git a/src/error.c b/src/error.c index 769021b445..c9def66bec 100644 --- a/src/error.c +++ b/src/error.c @@ -412,10 +412,12 @@ label fill-in entry is not found. #if CHECKING if (lfie->label == NULL) { #if DEBUG +/* GCOVR_EXCL_START */ char *label_copy = alloc_general((sizeof_t)length+1); strncpy(label_copy, label, length); label_copy[length] = '\0'; fprintf(f_debug, "missing fill-in label: %s\n", label_copy); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str( "get_label_fill_in_entry: no label fill-in found"); @@ -460,11 +462,13 @@ fill-in entries are valid. #endif /* EXPENSIVE_CHECKING && !STANDALONE_UTILITY_PROGRAM */ #if DEBUG +/* GCOVR_EXCL_START */ /* Counts of tables allocated, to track total use of memory. */ STATIC_THREAD uint32_t num_diagnostics_allocated, num_diag_fill_ins_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ STATIC_THREAD a_diagnostic_ptr @@ -962,7 +966,9 @@ of freed entries if possible. /* Allocate a new entry. */ dp = alloc_general_or_in_region_of_type(diag_memory_region, a_diagnostic); #if DEBUG +/* GCOVR_EXCL_START */ num_diagnostics_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ dp->kind = dck_primary; @@ -1047,7 +1053,9 @@ is specified by "kind". dfip = alloc_general_or_in_region_of_type(diag_memory_region, a_diag_fill_in); #if DEBUG +/* GCOVR_EXCL_START */ num_diag_fill_ins_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ dfip->next = NULL; @@ -2175,11 +2183,13 @@ made is returned. #if CHECKING if (curr_file == NULL) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level > 0) { (void)fprintf(f_debug, "Missing file index entry for source file \"%s\"\n", src_file->full_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("update_file_index: missing file index entry"); } /* if */ @@ -2235,6 +2245,7 @@ made is returned. INITIAL_PHYSICAL_LINE_COUNT_INCREMENT; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Updated error file index entries:\n"); for (idx = 0; @@ -2244,6 +2255,7 @@ made is returned. } /* for */ fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Return the physical line number at which the next entry should be made. */ return physical_line + @@ -2279,11 +2291,13 @@ file which is closer to the desired line. #if CHECKING if (curr_file == NULL) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level > 0) { (void)fprintf(f_debug, "Missing file index entry for source file \"%s\"\n", src_file->full_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("optimum_file_start_position: missing file index entry"); } /* if */ @@ -5935,9 +5949,11 @@ to the error severity of the error to be issued. } else if ((open_result->flags & OFR_BAD_NAME) != 0) { issue_error = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ } else if ((open_flags & OFF_FORCE_ERROR) != 0) { /* If this debug flag is specified, force an error to be issued. */ issue_error = TRUE; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ *severity = (open_flags & OFF_COMMAND_LINE) != 0 ? es_command_line_error @@ -5965,11 +5981,13 @@ is not Unicode. file = open_source_file(file_name, open_result, unicode_source_kind); #if DEBUG +/* GCOVR_EXCL_START */ /* Pretend the open failed if OFF_FORCE_ERROR is specified. */ if ((open_flags & OFF_FORCE_ERROR) != 0) { if (file != NULL) (void)fclose(file); file = NULL; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (file == NULL && open_error_should_be_issued(open_flags, open_result, &severity)) { @@ -6019,11 +6037,13 @@ code for the description of the file to be used if an error is issued. file = fopen_with_result(file_name, mode, &open_result); #if DEBUG +/* GCOVR_EXCL_START */ /* Pretend the open failed if OFF_FORCE_ERROR is specified. */ if ((open_flags & OFF_FORCE_ERROR) != 0) { if (file != NULL) (void)fclose(file); file = NULL; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (file == NULL && open_error_should_be_issued(open_flags, &open_result, &severity)) { @@ -6057,11 +6077,13 @@ the description of the file to be used if an error is issued. file = open_output_file(file_name, binary_file, update_mode, &open_result); #if DEBUG +/* GCOVR_EXCL_START */ /* Pretend the open failed if OFF_FORCE_ERROR is specified. */ if ((open_flags & OFF_FORCE_ERROR) != 0) { if (file != NULL) (void)fclose(file); file = NULL; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (file == NULL && open_error_should_be_issued(open_flags, &open_result, &severity)) { @@ -6093,11 +6115,13 @@ error is issued. file = open_input_file(file_name, binary_file, &open_result); #if DEBUG +/* GCOVR_EXCL_START */ /* Pretend the open failed if OFF_FORCE_ERROR is specified. */ if ((open_flags & OFF_FORCE_ERROR) != 0) { if (file != NULL) (void)fclose(file); file = NULL; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (file == NULL && open_error_should_be_issued(open_flags, &open_result, &severity)) { @@ -8352,7 +8376,9 @@ reset the associated debug output FILE* (f_debug). close_f_error_if_open(); f_error = default_error_output_file(); #if DEBUG +/* GCOVR_EXCL_START */ f_debug = f_error; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* reset_f_error */ @@ -8476,8 +8502,10 @@ of each compilation. avail_diag_fill_ins = NULL; diagnostic_indent = 0; #if DEBUG +/* GCOVR_EXCL_START */ num_diagnostics_allocated = 0; num_diag_fill_ins_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ memzero((char *)recorded_diagnostic_table, sizeof(recorded_diagnostic_table)); @@ -8511,6 +8539,7 @@ of each compilation. } /* error_init */ #if DEBUG +/* GCOVR_EXCL_START */ unsigned long show_error_space_used(void) /* @@ -8529,6 +8558,7 @@ structures for space tracking purposes. return grand_total; } /* show_error_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ namespace detail { diff --git a/src/error.h b/src/error.h index 3d9544670c..e5958b179b 100644 --- a/src/error.h +++ b/src/error.h @@ -1022,7 +1022,9 @@ NORETURN extern void end_command_line_error(a_diagnostic_ptr dp); extern void syntax_error(an_error_code error_code); #if DEBUG +/* GCOVR_EXCL_START */ unsigned long show_error_space_used(void); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ namespace detail { diff --git a/src/expr.c b/src/expr.c index fe8a6d57cd..9c81ffa455 100644 --- a/src/expr.c +++ b/src/expr.c @@ -2856,10 +2856,12 @@ given options and PREC_LOWEST precedence. saved_stack_lifetime = expr_stack->lifetime; expr_stack->lifetime = wrap_lifetime; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_lifetimes")) { db_object_lifetime_with_indentation(curr_object_lifetime, "About to bundle: "); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Scan the initializer expression and put it into an init-component. */ @@ -2876,10 +2878,12 @@ given options and PREC_LOWEST precedence. curr_object_lifetime = saved_curr_lifetime; expr_stack->lifetime = saved_stack_lifetime; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_lifetimes")) { db_object_lifetime_with_indentation(curr_object_lifetime, "Bundling done: "); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ icp->bundled = bundle; @@ -13827,9 +13831,11 @@ address), in which case a conversion is not used. #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_expression(expression); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); @@ -19590,6 +19596,7 @@ there is an error. func_arg_number is -1 if there was a previous error. (func_arg_number >= first_arg_number && func_arg_number <= last_arg_number)); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "func_arg_number = %d, arg_type = ", func_arg_number); if (arg_type == NULL) { @@ -19599,6 +19606,7 @@ there is an error. func_arg_number is -1 if there was a previous error. } /* if */ fputs("\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Loop through the remaining arguments, ignoring everything except the function name associated with the argument type -- i.e., the @@ -20379,7 +20387,9 @@ Scan the Microsoft extension __noop(...). The argument list is not evaluated. This is used for disabled debug functions, e.g., #if DEBUG + /* GCOVR_EXCL_START */ #define dbprint printf + /* GCOVR_EXCL_STOP */ #else #define dbprint __noop #endif @@ -42468,7 +42478,9 @@ which of the various keywords was used. (a_generated_entity_block_ptr) alloc_fe(sizeof(a_generated_entity_block)); #if DEBUG +/* GCOVR_EXCL_START */ ++num_generated_entity_blocks_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ gen_entity_block->function_name = NULL; gen_entity_block->pretty_function_name = NULL; @@ -44907,9 +44919,11 @@ see expr.h). db_enter(4, "scan_expr_full"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "precedence level = %d\n", prec_level); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if MICROSOFT_EXTENSIONS_ALLOWED if (curr_token == tok_pending_ifc_expr) { @@ -46691,9 +46705,11 @@ case, just process that expression. #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_expression(expression); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); @@ -46817,6 +46833,7 @@ case, just process that expression. #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { if (dip != NULL && *dip != NULL) { db_dynamic_initializer(*dip, /*level=*/0); @@ -46824,6 +46841,7 @@ case, just process that expression. db_expression(expression); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); @@ -46875,9 +46893,11 @@ the expression is also allowed to have that type. #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 && expression != NULL) { db_expression(expression); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); @@ -47147,9 +47167,11 @@ be recorded that the final comparison was 5 == 4. #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_constant(constant); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* scan_bool_constant_expression */ @@ -52098,9 +52120,11 @@ interpreter.) #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ if (gpp_mode && !parameters_visible_late) make_param_syms_invisible(FALSE); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_expression(node); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* scan_default_arg_expr */ @@ -52310,10 +52334,12 @@ lowering or a back end to do the rewriting. possible = TRUE; func_scope->variant.routine.return_value_variable = return_var; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "NRVO variable = %s\n", return_var->source_corresp.name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -52322,9 +52348,11 @@ lowering or a back end to do the rewriting. if (!possible) { /* The return value optimization has been ruled out. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "NRVO ruled out.\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ssep->return_value_optimization_possible = FALSE; func_scope->variant.routine.return_value_variable = NULL; @@ -52960,9 +52988,11 @@ make_coroutine_result_expression.) #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 && expression != NULL) { db_expression(expression); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return expression; @@ -53123,10 +53153,12 @@ Scan a pre-processor expression. See sections 3.4 and 3.8.1 in the standard. curr_construct_end_position = result.end_position; #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_constant(constant); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* scan_pp_expression */ @@ -53240,10 +53272,12 @@ is the value of an enumerator. The value of the constant is returned in curr_construct_end_position = result.end_position; #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_constant(constant); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* scan_integral_constant_expression_full */ @@ -53487,6 +53521,7 @@ expression context. Return either *is_constant TRUE and a constant value in #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { if (*is_constant) { db_constant(constant); @@ -53495,6 +53530,7 @@ expression context. Return either *is_constant TRUE and a constant value in } /* if */ fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* scan_nonconstant_dimension_expression */ @@ -53768,10 +53804,12 @@ memory region). Do various error checks. constant->null_pointer_constant_ruled_out = TRUE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_constant(constant); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* prep_nontype_template_argument_initializer */ @@ -54107,10 +54145,12 @@ are NULL by default. switch_back_to_original_region(region_to_switch_back_to); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_constant(constant); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* scan_template_argument_constant_expression */ @@ -54185,9 +54225,11 @@ free_arg_operand_list to free the entry. curr_construct_end_position = opnd->end_position; #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_operand(opnd); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ curr_object_lifetime = saved_curr_object_lifetime; if (class_instantiation_sequence_number != initial_inst_seq_num) { @@ -54320,10 +54362,12 @@ type will be obtained from the arg_operand. } /* if */ do_fs_constant_fixup(constant); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_constant(constant); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* conv_nontype_template_arg_to_param_type */ @@ -56301,10 +56345,12 @@ standard form). Assumes copy-initialization ("="-form). dps, (an_init_state *)NULL); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_constant(constant); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ scope_stack_top().decl_parse_state = saved_dps; db_exit(); @@ -56421,10 +56467,12 @@ constants; assumes copy-initialization ("="-form). #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_constant(constant); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* scan_constant_initializer_expression */ @@ -57182,9 +57230,11 @@ case, just process that expression. #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_expression(expr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); @@ -57245,9 +57295,11 @@ the __uuidof keyword. curr_construct_end_position = result.end_position; #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "uuid_str = %s\n", uuid_str == NULL ? "": uuid_str); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return uuid_str; diff --git a/src/exprutil.c b/src/exprutil.c index db22dd4b7b..cccf66beb1 100644 --- a/src/exprutil.c +++ b/src/exprutil.c @@ -117,6 +117,7 @@ STATIC_THREAD a_dynamic_init_dtor_fixup_ptr #if DEBUG +/* GCOVR_EXCL_START */ /* Counts of entries allocated, for debugging purposes. */ @@ -148,6 +149,7 @@ context" if expr_stack->suppress_diagnostics is TRUE. } /* if */ } /* count_rescan_fs_expr_nodes */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if SEQUENCING_DIAGNOSTICS_ENABLED @@ -167,7 +169,9 @@ Allocate and return a sequence info entry that points to expr. /* Allocate a new entry. */ spiep = alloc_fe_of_type(a_seq_pt_info_entry); #if DEBUG +/* GCOVR_EXCL_START */ num_sequence_info_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ spiep->next = NULL; @@ -209,7 +213,9 @@ Allocate and return a sequence point variable entry that points to variable. /* Allocate a new entry. */ spvep = alloc_fe_of_type(a_seq_pt_var_entry); #if DEBUG +/* GCOVR_EXCL_START */ num_seq_pt_var_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ spvep->next = NULL; @@ -308,7 +314,9 @@ the current expression, headed by curr_expr_ref_entries. /* Allocate a new entry. */ rep = (a_ref_entry_ptr)alloc_fe(sizeof(a_ref_entry)); #if DEBUG +/* GCOVR_EXCL_START */ num_ref_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ rep->kind = SRK_REFERENCE; @@ -905,7 +913,9 @@ entries are used to hold arguments of function calls. /* Allocate a new entry. */ aop = (an_arg_operand_ptr)alloc_fe(sizeof(an_arg_operand)); #if DEBUG +/* GCOVR_EXCL_START */ num_arg_operands_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ aop->next = NULL; @@ -1006,13 +1016,17 @@ kind to "kind" and its fields to default values, and return a pointer to it. icp = avail_init_components; avail_init_components = icp->next; #if DEBUG +/* GCOVR_EXCL_START */ num_init_components_freed--; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { /* Allocate a new entry. */ icp = alloc_fe_of_type(an_init_component); #if DEBUG +/* GCOVR_EXCL_START */ num_init_components_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ icp->next = NULL; @@ -1093,7 +1107,9 @@ subtree of entries, free those as well. icp->next = avail_init_components; avail_init_components = icp; #if DEBUG +/* GCOVR_EXCL_START */ num_init_components_freed++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ end_of_routine:; } /* free_init_component */ @@ -1250,6 +1266,7 @@ expansion, return TRUE. Otherwise, return FALSE. } /* any_pack_expansion_components_in_list */ #if DEBUG +/* GCOVR_EXCL_START */ void db_init_component(an_init_component_ptr icp) /* @@ -1331,6 +1348,7 @@ Output a list of initializer components for debugging purposes. } /* if */ } /* db_icp_list */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void conv_braced_init_component_to_error_expression(an_arg_list_elem_ptr alep) @@ -1563,7 +1581,9 @@ The entry is put on the fixup list for the current expression context. didfp = (a_dynamic_init_dtor_fixup_ptr) alloc_fe(sizeof(a_dynamic_init_dtor_fixup)); #if DEBUG +/* GCOVR_EXCL_START */ num_dynamic_init_dtor_fixups_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ didfp->next = expr_stack->dynamic_init_dtor_fixup_list; @@ -2784,9 +2804,11 @@ destructions preceding the first destruction from the expression). #if CHECKING if (tdip == NULL) { #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "Dynamic init not found:\n"); db_dynamic_initializer(dip, 2); db_object_lifetime(curr_object_lifetime); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str2("update_last_processed_dynamic_init:", "dip not found"); @@ -2808,11 +2830,13 @@ destructions preceding the first destruction from the expression). #if CHECKING if (tdip == NULL) { #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "Dynamic init to insert:\n"); db_dynamic_initializer(dip, 2); fprintf(f_debug, "Dynamic init not found:\n"); db_dynamic_initializer(tblock->last_relinked_dynamic_init, 2); db_object_lifetime(curr_object_lifetime); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str2("update_last_processed_dynamic_init:", "insert point not found"); @@ -3584,6 +3608,7 @@ If the operand is an expression, do not set the position in the expression. } /* set_operand_position_to_pos_curr_token */ #if DEBUG +/* GCOVR_EXCL_START */ void db_operand(an_operand *operand) /* @@ -3720,6 +3745,7 @@ debug output. db_ref_entries(operand->ref_entries_list); } /* db_operand_ref_entries */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ an_expr_node_ptr alloc_empty_parens_func_cast( @@ -4413,7 +4439,9 @@ set its fields to default values, and return a pointer to it. eriep = (an_expr_rescan_info_entry_ptr)alloc_fe( sizeof(an_expr_rescan_info_entry)); #if DEBUG +/* GCOVR_EXCL_START */ num_expr_rescan_info_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ clear_expr_rescan_info_entry(eriep); return eriep; @@ -20779,7 +20807,9 @@ in the source (and *operator_position gives its position). /* Okay. */ } else { #if DEBUG +/* GCOVR_EXCL_START */ db_operand(operand); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("take_address_of_or_reference_to_lvalue: not an lvalue"); #endif /* CHECKING */ @@ -22873,8 +22903,10 @@ it might produce an error). original state of the expression.) */ if (!is_rvalueable_node(node) && !node_is(node, enk_lambda)) { #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "\n"); db_expression(node); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str("conv_glvalue_expr_to_prvalue: bad expr"); } /* if */ @@ -25715,6 +25747,7 @@ struct a_constraint_chart { #if DEBUG +/* GCOVR_EXCL_START */ /*lint -esym(714,*db_constraint_chart)*/ void db_constraint_chart(a_constraint_chart *chart) @@ -25821,6 +25854,7 @@ constraints). } /* if */ } /* db_active_E2_constraint */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ using a_constraint_charts_map = Ptr_map; @@ -25842,6 +25876,7 @@ the chart links identical expressions on a circular linked list through the using an_expr_chart_map = Ptr_map; #if DEBUG +/* GCOVR_EXCL_START */ /* Explicitly instantiate "an_expr_chart_map"'s db_ptrs function. Note that, @@ -25849,6 +25884,7 @@ grammatically, the type alias an_expr_chart_map cannot be used here. */ template void Ptr_map::db_ptrs() const; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -27801,6 +27837,7 @@ memory region constraints. #if DEBUG +/* GCOVR_EXCL_START */ unsigned long show_expr_space_used(void) /* Display and return the amount of space used for various expression tables. @@ -27838,6 +27875,7 @@ Display and return the amount of space used for various expression tables. return grand_total; } /* show_expr_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if CHECKING && DEBUG @@ -27887,6 +27925,7 @@ Do one-time initialization of variables related to expression processing. pch_saved_var_array_elem(imaginary_unit), #endif /* C99_IL_EXTENSIONS_SUPPORTED */ #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_arg_operands_allocated), pch_saved_var_array_elem(num_init_components_allocated), pch_saved_var_array_elem(num_init_components_permanently_allocated), @@ -27900,6 +27939,7 @@ Do one-time initialization of variables related to expression processing. pch_saved_var_array_elem(num_dynamic_init_dtor_fixups_allocated), pch_saved_var_array_elem(num_arg_match_summaries_allocated), pch_saved_var_array_elem(num_candidate_functions_allocated), +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pch_saved_var_array_terminating_elem() }; @@ -27994,6 +28034,7 @@ for each compilation. avail_init_components = NULL; avail_dynamic_init_dtor_fixups = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_arg_match_summaries_allocated = 0; num_arg_operands_allocated = 0; num_init_components_allocated = 0; @@ -28006,6 +28047,7 @@ for each compilation. num_sequence_info_entries_allocated = 0; #endif /* SEQUENCING_DIAGNOSTICS_ENABLED */ num_dynamic_init_dtor_fixups_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ constraint_charts = new_fe(/*mask_width=*/10u); template_param_objects = diff --git a/src/exprutil.h b/src/exprutil.h index fd7441f146..32c6c5cf90 100644 --- a/src/exprutil.h +++ b/src/exprutil.h @@ -1311,11 +1311,13 @@ EXTERN_THREAD a_boolean reduce_backing_expression_use; #if DEBUG +/* GCOVR_EXCL_START */ /* Counts of entries allocated, for debugging purposes. */ EXTERN_THREAD unsigned long num_arg_match_summaries_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* @@ -1655,7 +1657,9 @@ extern a_boolean any_pack_expansion_components_in_list(an_init_component_ptr icp); #if DEBUG +/* GCOVR_EXCL_START */ extern void db_init_component(an_init_component_ptr icp); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ extern @@ -2151,11 +2155,13 @@ extern void make_string_constant_operand(a_constant *constant, an_operand *operand); #if DEBUG +/* GCOVR_EXCL_START */ extern void db_operand(an_operand *operand); extern void db_ref_entries(a_ref_entry_ptr rep); extern void db_operand_ref_entries(an_operand *operand); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ extern void clear_operand(an_operand_kind kind, @@ -3407,9 +3413,11 @@ a_dynamic_init_ptr unoptimize_conditional_return(a_dynamic_init_ptr dip, a_source_position *pos); #if DEBUG +/* GCOVR_EXCL_START */ extern void count_rescan_fs_expr_nodes(unsigned long *p_count); extern unsigned long show_expr_space_used(void); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if CHECKING && DEBUG extern void check_all_init_component_entries_freed(void); diff --git a/src/fe_common.h b/src/fe_common.h index 2a9edda739..888016839d 100644 --- a/src/fe_common.h +++ b/src/fe_common.h @@ -133,8 +133,10 @@ of processing. This is a list of the files that are directly or indirectly #include "trans_corresp.h" #if DEBUG +/* GCOVR_EXCL_START */ /* Debug declarations. */ #include "debug.h" +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #include "sys_predef.h" diff --git a/src/fe_init.c b/src/fe_init.c index 3dbd913e1a..123957de56 100644 --- a/src/fe_init.c +++ b/src/fe_init.c @@ -271,8 +271,10 @@ CONSTINIT_ARRAY(/* none */, a_function_pointer, function_pointers, fn_last + 1) (a_function_pointer)test_next_construct_pragma, #endif /* INCLUDE_EDG_TEST_PRAGMAS */ #if DEBUG +/* GCOVR_EXCL_START */ (a_function_pointer)db_opt_pragma, (a_function_pointer)db_name_pragma, +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if NEED_IL_DISPLAY (a_function_pointer)pragma_il_display, @@ -1756,9 +1758,11 @@ line processing is done. */ { #if DEBUG +/* GCOVR_EXCL_START */ /* Initialize debugging data structures. This must be done first in this routine. */ debug_early_init(); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if CHECKING check_int_type_config(); @@ -1876,7 +1880,9 @@ after the command-line processing has been done. } /* if */ #endif /* CHECKING */ #if DEBUG +/* GCOVR_EXCL_START */ mem_manage_one_time_init_done(); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* fe_one_time_init */ @@ -1893,12 +1899,14 @@ source file's compilation. time_t timer; char *time_str; #if DEBUG +/* GCOVR_EXCL_START */ int save_debug_level; /* Drop the debug level to 0 during initialization. If debug output is desired in initialization, it can be explicitly requested by name (of this routine, "fe_init_part_1"). */ debug_level = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_enter(5, "fe_init_part_1"); @@ -1987,6 +1995,7 @@ source file's compilation. identify_source_file(); #endif /* COMPILE_MULTIPLE_SOURCE_FILES */ #if DEBUG +/* GCOVR_EXCL_START */ /* Establish the initial debug level (from the command line, or 0 by default) at this point so that the first line will be read with the same debug level as the other lines. This avoids the confusion of @@ -1994,11 +2003,14 @@ source file's compilation. other lines appear. */ save_debug_level = debug_level; if (init_debug_level > debug_level) debug_level = init_debug_level; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if DEBUG +/* GCOVR_EXCL_START */ /* Restore the debug level fe_init is supposed to have (0 unless there's a command-line request to change the debug level in fe_init). */ debug_level = save_debug_level; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ il_header.plain_chars_are_signed = targ_has_signed_chars; @@ -2069,9 +2081,11 @@ source file's compilation. write_init(); db_exit(); #if DEBUG +/* GCOVR_EXCL_START */ /* Restore the initial debug level (from the command line, or 0 by default). */ debug_level = init_debug_level; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* fe_init_part_1 */ @@ -2303,7 +2317,9 @@ when it is a secondary file. do_preprocessing_only = FALSE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ mem_manage_trans_unit_init_done(); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* fe_translation_unit_init */ diff --git a/src/fe_wrapup.c b/src/fe_wrapup.c index 698a1d6245..1f12b6e67c 100644 --- a/src/fe_wrapup.c +++ b/src/fe_wrapup.c @@ -29,7 +29,9 @@ fe_wrapup.c - End of front end processing. #include "il_write.h" #endif /* IL_SHOULD_BE_WRITTEN_TO_FILE */ #if DEBUG +/* GCOVR_EXCL_START */ #include "overload.h" +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #include "templates.h" #include "trans_corresp.h" @@ -42,9 +44,11 @@ fe_wrapup.c - End of front end processing. #include "lower_name.h" #endif /* MANGLE_ALL_NAMES */ #if DEBUG +/* GCOVR_EXCL_START */ #include "exprutil.h" #include "preproc.h" #include "statements.h" +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if MAINTAIN_NEEDED_FLAGS || DO_IL_LOWERING #include "il_walk.h" @@ -63,6 +67,7 @@ fe_wrapup.c - End of front end processing. BEGIN_EDG_NAMESPACE #if DEBUG +/* GCOVR_EXCL_START */ static void show_space_used(void) /* Show the amount of memory allocated. @@ -89,6 +94,7 @@ Show the amount of memory allocated. show_mem_manage_space_used(total_space); } /* show_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -169,10 +175,12 @@ It's a static entity that may be referenced from exported templates. a_trans_unit_corresp_ptr tucp; #if DEBUG +/* GCOVR_EXCL_START */ if (db_has_traced_name(scp, kind)) { fprintf(f_debug, "Externalizing for exported templates:\n"); db_entity_info((char *)scp, kind); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ externalize_source_correspondence(scp, is_variable); if (is_variable) { @@ -785,11 +793,13 @@ and before the back end (if any) is executed. copy_macro_invocation_tree_to_il(); #endif /* MACRO_INVOCATION_TREE_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("source_file_for_seq_info")) { /* Display some debug information about the source file to sequence number translation process. */ db_source_file_for_seq_info(); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Lower the file scope, remove unneeded entities, etc. */ @@ -820,6 +830,7 @@ and before the back end (if any) is executed. close_output_file_with_error_handling(&f_xref_info, ec_cross_reference); #if DEBUG +/* GCOVR_EXCL_START */ if (display_space_used || debug_level > 0 || db_flag_is_set("space_used")) { /* Print total memory used. */ show_space_used(); @@ -830,6 +841,7 @@ and before the back end (if any) is executed. if (db_flag_is_set("viability")) { db_viability_stats(); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if CHECKING diff --git a/src/fixed_pt.c b/src/fixed_pt.c index 0cd84de4a0..10e9996955 100644 --- a/src/fixed_pt.c +++ b/src/fixed_pt.c @@ -266,6 +266,7 @@ fxp_descr describes the format of the value being stored. source = (char*)&(mp->parts[source_part]) + source_byte; *dest = *source; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("fxp_store")) { long source_offset, dest_offset; source_offset = (long)(source - (char *)(&mp->parts[0])); @@ -274,6 +275,7 @@ fxp_descr describes the format of the value being stored. source_offset, dest_offset, (unsigned int)(unsigned char)*dest); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ } else { @@ -577,12 +579,14 @@ the value is already known to be too large. Set *err on overflow. Set } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("fxp_conv")) { fprintf(f_debug, "fxp hex value: "); db_mantissa(mp); fprintf(f_debug, "exponent=%ld, nonfract=%ld, shift=%ld\n", exponent, nonfract_bits, shift_count); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (overflow) { /* On overflow, return an error flag and set the result value to a diff --git a/src/float_pt.c b/src/float_pt.c index 4a39b52b15..7156f766a0 100644 --- a/src/float_pt.c +++ b/src/float_pt.c @@ -599,6 +599,7 @@ value for any error. #if USE_LONG_DOUBLE_FOR_HOST_FP_VALUE || APPROXIMATE_QUADMATH #if DEBUG +/* GCOVR_EXCL_START */ void db_long_double(long double d) /* Display a long double, for debugging purposes. @@ -606,6 +607,7 @@ Display a long double, for debugging purposes. { fprintf(f_debug, "%.40Le\n", d); } /* db_long_double */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* USE_LONG_DOUBLE_FOR_HOST_FP_VALUE || APPROXIMATE_QUADMATH */ @@ -740,6 +742,7 @@ Convert the given string to a host floating point value (stored in *value). #endif /* USE_HOST_FP_CONVERSION_ROUTINES */ #if DEBUG +/* GCOVR_EXCL_START */ void db_internal_float_value(an_internal_float_value *ifv) /* @@ -754,6 +757,7 @@ Display an internal floating-point value, for debugging purposes. fprintf(f_debug, "\n"); } /* db_internal_float_value */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static void conv_host_fp_to_float(a_host_fp_value temp, @@ -1949,6 +1953,7 @@ Clear the fields of a mantissa entry. } /* init_mantissa */ #if DEBUG +/* GCOVR_EXCL_START */ void db_mantissa(a_mantissa_ptr mp) /* @@ -1963,6 +1968,7 @@ Display a mantissa value, for debugging purposes. fprintf(f_debug, "\n"); } /* db_mantissa */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void shift_left_mantissa(a_mantissa_ptr mp, @@ -2766,11 +2772,13 @@ exponent was out of range). /* Set the error flag if the exponent was too large. */ if (overflow) *err = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("fp_hex_string_to_float")) { fprintf(f_debug, "fp hex value: "); db_mantissa(mp); fprintf(f_debug, "exponent=%ld\n", exponent); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Check whether the resulting value fits in the type being used. */ check_and_denormalize_hex_fp_value(mp, &exponent, kind, err, inexact, @@ -2918,22 +2926,26 @@ before setting it if there are unused bits. } #endif /* !HOST_HAS_FLOAT16_TYPE && !USE_SOFTFLOAT */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("fp")) { fprintf(f_debug, "read_float16: res=%d\n", (int)res); fprintf(f_debug, " %s\n ", str); db_binary_float16((unsigned char *)&float_value_temp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else if (kind == fk_float || kind == fk_std_float32 || kind == fk_std_bfloat16) { res = read_float((unsigned char *)&float_value_temp, str, (int)strlen(str)); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("fp")) { fprintf(f_debug, "read_float: res=%d\n", (int)res); fprintf(f_debug, " %s\n ", str); db_binary_float((unsigned char *)&float_value_temp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else if (kind_is_binary64(kind)) { /* Either "double" or "long double", where "double" and "long double" @@ -2941,22 +2953,26 @@ before setting it if there are unused bits. res = read_double((unsigned char *)&float_value_temp, str, (int)strlen(str)); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("fp")) { fprintf(f_debug, "read_double: res=%d\n", (int)res); fprintf(f_debug, " %s\n ", str); db_binary_double((unsigned char *)&float_value_temp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if FLOAT80_ENABLING_POSSIBLE } else if (kind == (a_float_kind)fk_float80) { res = read_float80((unsigned char *)&float_value_temp, str, (int)strlen(str)); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("fp")) { fprintf(f_debug, "read_float80: res=%d\n", (int)res); fprintf(f_debug, " %s\n ", str); db_binary_float80((unsigned char *)&float_value_temp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* FLOAT80_ENABLING_POSSIBLE */ #if FLOAT128_ENABLING_POSSIBLE @@ -2964,11 +2980,13 @@ before setting it if there are unused bits. res = read_float128((unsigned char *)&float_value_temp, str, (int)strlen(str)); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("fp")) { fprintf(f_debug, "read_float128: res=%d\n", (int)res); fprintf(f_debug, " %s\n ", str); db_binary_float128((unsigned char *)&float_value_temp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* FLOAT128_ENABLING_POSSIBLE */ } else { @@ -2977,11 +2995,13 @@ before setting it if there are unused bits. res = read_long_double((unsigned char *)&float_value_temp, str, (int)strlen(str)); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("fp")) { fprintf(f_debug, "read_long_double: res=%d\n", (int)res); fprintf(f_debug, " %s\n ", str); db_binary_long_double((unsigned char *)&float_value_temp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #else /* !FP_HAS_LONG_DOUBLE */ unexpected_condition(); @@ -3305,53 +3325,63 @@ value might use (plus a temporary null character). if (kind_is_binary16(value.kind)) { res = write_float16(buff_ptr, (int)size_hint, float_as_char); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("fp")) { fprintf(f_debug, "write_float16: res=%d\n ", (int)res); db_binary_float16(float_as_char); fprintf(f_debug, " %s\n", buff_ptr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else if (value.kind == fk_float || value.kind == fk_std_float32 || value.kind == fk_std_bfloat16) { res = write_float(buff_ptr, (int)size_hint, float_as_char); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("fp")) { fprintf(f_debug, "write_float: res=%d\n ", (int)res); db_binary_float(float_as_char); fprintf(f_debug, " %s\n", buff_ptr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else if (kind_is_binary64(value.kind)) { /* Either "double" or "long double", where "double" and "long double" are configured as binary64. */ res = write_double(buff_ptr, (int)size_hint, float_as_char); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("fp")) { fprintf(f_debug, "write_double: res=%d\n ", (int)res); db_binary_double(float_as_char); fprintf(f_debug, " %s\n", buff_ptr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if FLOAT80_ENABLING_POSSIBLE } else if (value.kind == fk_float80) { res = write_float80(buff_ptr, (int)size_hint, float_as_char); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("fp")) { fprintf(f_debug, "write_float80: res=%d\n ", (int)res); db_binary_float80(float_as_char); fprintf(f_debug, " %s\n", buff_ptr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* FLOAT80_ENABLING_POSSIBLE */ #if FLOAT128_ENABLING_POSSIBLE } else if (value.kind == fk_float128 || value.kind == fk_std_float128) { res = write_float128(buff_ptr, (int)size_hint, float_as_char); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("fp")) { fprintf(f_debug, "write_float128: res=%d\n ", (int)res); db_binary_float128(float_as_char); fprintf(f_debug, " %s\n", buff_ptr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* FLOAT128_ENABLING_POSSIBLE */ } else { @@ -3359,11 +3389,13 @@ value might use (plus a temporary null character). check_assertion(repr_is_long_double(value.kind)); res = write_long_double(buff_ptr, (int)size_hint, float_as_char); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("fp")) { fprintf(f_debug, "write_long_double: res=%d\n ", (int)res); db_binary_long_double(float_as_char); fprintf(f_debug, " %s\n", buff_ptr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #else /* !FP_HAS_LONG_DOUBLE */ unexpected_condition(); diff --git a/src/float_pt.h b/src/float_pt.h index 7a6b273a0f..20bcb7121b 100644 --- a/src/float_pt.h +++ b/src/float_pt.h @@ -62,11 +62,13 @@ extern void round_hex_fp_value(a_mantissa_ptr mp, a_boolean *inexact); #if DEBUG +/* GCOVR_EXCL_START */ extern void db_mantissa(a_mantissa_ptr mp); extern void db_internal_float_value(an_internal_float_value *ifv); extern void db_long_double(long double d); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ extern void conv_hex_string_to_mantissa_and_exponent( diff --git a/src/float_type.h b/src/float_type.h index 110f5c79f1..a15518db8c 100644 --- a/src/float_type.h +++ b/src/float_type.h @@ -375,8 +375,10 @@ subsequent inclusions with a different floating-point type. #define ONE CONCAT(one_, FPT_NAME) #define DEC CONCAT(dec_, FPT_NAME) #if DEBUG +/* GCOVR_EXCL_START */ #define DB_BINARY_FN CONCAT(db_binary_, FPT_NAME) #define DB_DUMP CONCAT(db_dump_, FPT_NAME) +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Special mode for some stand-alone floating-point tests. */ @@ -734,6 +736,7 @@ Set *bin to the minimum subnormal value. } /* MAKE_MIN_SUBNORMAL */ #if DEBUG +/* GCOVR_EXCL_START */ void DB_BINARY_FN(unsigned char *tgt) /* @@ -789,6 +792,7 @@ type. } /* if */ } /* DB_DUMP */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Internal macros */ @@ -1526,8 +1530,10 @@ zero). #undef ONE #undef DEC #if DEBUG +/* GCOVR_EXCL_START */ #undef DB_BINARY_FN #undef DB_DUMP +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #undef FRAC_BITS diff --git a/src/floating.h b/src/floating.h index a1e2231e81..c444d1c7b4 100644 --- a/src/floating.h +++ b/src/floating.h @@ -641,6 +641,7 @@ extern an_fp_return_type read_float128(unsigned char *val, #endif /* FLOAT128_ENABLING_POSSIBLE */ #if DEBUG +/* GCOVR_EXCL_START */ extern void db_binary_float16(unsigned char *val); extern void db_binary_float(unsigned char *val); extern void db_binary_double(unsigned char *val); @@ -651,6 +652,7 @@ extern void db_binary_float80(unsigned char *val); #if FLOAT128_ENABLING_POSSIBLE extern void db_binary_float128(unsigned char *val); #endif /* FLOAT128_ENABLING_POSSIBLE */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ EXTERN_THREAD a_boolean diff --git a/src/folding.c b/src/folding.c index 221d60bf1f..82b278ba31 100644 --- a/src/folding.c +++ b/src/folding.c @@ -2778,6 +2778,7 @@ for any diagnostics issued. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "type_change_constant of "); db_constant(constant); @@ -2795,6 +2796,7 @@ for any diagnostics issued. } /* if */ fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (err_code != ec_no_error) { /* There was an error or warning. */ @@ -3016,6 +3018,7 @@ parameter constant that might be a null pointer constant. #if DEBUG +/* GCOVR_EXCL_START */ static void db_unary_operation(a_const_char *operation, a_constant *operand, a_constant *result, @@ -3033,6 +3036,7 @@ Do a debug print giving the result of folding a one-operand constant operation. fprintf(f_debug, "\n"); } /* if */ } /* db_unary_operation */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -3083,7 +3087,9 @@ Do the negate operation on all types of integers. *err_severity = es_warning; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_unary_operation("i-", constant, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_inegate */ @@ -3115,7 +3121,9 @@ Do the negate operation on all types of float and imaginary values. } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_unary_operation("f-", constant, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_fnegate */ @@ -3147,7 +3155,9 @@ Do the negate operation on all types of fixed-point values. } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_unary_operation("fx-", constant, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_fxnegate */ @@ -3180,7 +3190,9 @@ Do the negate operation on all types of complex. *err_severity = es_error; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_unary_operation("x-", constant, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_xnegate */ @@ -3207,7 +3219,9 @@ Do the complement operation on all types of integers. result->non_arithmetic = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ db_unary_operation("~", constant, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_complement */ @@ -3230,11 +3244,13 @@ Do the "!" (not) operation on all types of scalars. (a_host_large_integer)is_false_constant(constant)); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (*did_not_fold) { if (debug_level >= 5) fprintf(f_debug, "! did not fold\n"); } else { db_unary_operation("!", constant, result, ec_no_error); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_not */ @@ -3271,7 +3287,9 @@ types of complex values. } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_unary_operation("x~", constant, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_xconj */ @@ -3569,6 +3587,7 @@ for any diagnostics issued. #if DEBUG +/* GCOVR_EXCL_START */ static void db_binary_operation(a_const_char *operation, a_constant_ptr constant_1, a_constant_ptr constant_2, @@ -3599,6 +3618,7 @@ Do a debug print giving the result of folding a two-operand constant operation. fprintf(f_debug, "\n"); } /* if */ } /* db_binary_operation */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -3630,7 +3650,9 @@ Do the addition operation on all types of integers. err_code, err_severity); #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("i+", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_iadd */ @@ -3663,7 +3685,9 @@ Do the subtract operation on all types of integers. err_code, err_severity); #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("i-", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_isubtract */ @@ -3696,7 +3720,9 @@ Do the multiply operation on all types of integers. err_code, err_severity); #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("i*", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_imultiply */ @@ -3736,7 +3762,9 @@ Do the divide operation on all types of integers. err_code, err_severity); #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("i/", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_idivide */ @@ -3776,7 +3804,9 @@ Do the remainder operation ("%") on all types of integers. err_code, err_severity); #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("%", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_remainder */ @@ -3986,7 +4016,9 @@ Do the shift right operation on all types of integers. err_code, err_severity); #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation(">>", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_shiftr */ @@ -4004,7 +4036,9 @@ Do the shift left operation on all types of integers. err_code, err_severity); #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("<<", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_shiftl */ @@ -4062,7 +4096,9 @@ Do the shift right operation on fixed-point values. err_code, err_severity); #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("fx>>", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_fxshiftr */ @@ -4080,7 +4116,9 @@ Do the shift left operation on fixed-point values. err_code, err_severity); #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("fx<<", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_fxshiftl */ @@ -4119,8 +4157,10 @@ operator "op", and return a 0 or 1 integer in "result". (a_host_large_integer)result_value); #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation(db_operator_names[op], constant_1, constant_2, result, ec_no_error); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_icompare */ @@ -4153,8 +4193,10 @@ GNU C++ minimum and maximum operators ("?"). } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation(db_operator_names[op], constant_1, constant_2, result, ec_no_error); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_ignu_min_max */ @@ -4175,7 +4217,9 @@ Do the bitwise "and" operation on all types of integers. result->variant.integer_value = result_value; result->non_arithmetic = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("&", constant_1, constant_2, result, ec_no_error); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_and */ @@ -4195,7 +4239,9 @@ Do the bitwise "or" operation on all types of integers. result->variant.integer_value = result_value; result->non_arithmetic = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("|", constant_1, constant_2, result, ec_no_error); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_or */ @@ -4215,7 +4261,9 @@ Do the bitwise "xor" operation on all types of integers. result->variant.integer_value = result_value; result->non_arithmetic = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("^", constant_1, constant_2, result, ec_no_error); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_xor */ @@ -4250,11 +4298,13 @@ Do the logical "and" (&&) operation on integers, floats, and pointers. (a_host_large_integer)res); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (*did_not_fold) { if (debug_level >= 5) fprintf(f_debug, "&& did not fold\n"); } else { db_binary_operation("&&", constant_1, constant_2, result, ec_no_error); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_land */ @@ -4289,11 +4339,13 @@ Do the logical "or" (||) operation on integers, floats, and pointers. (a_host_large_integer)res); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (*did_not_fold) { if (debug_level >= 5) fprintf(f_debug, "|| did not fold\n"); } else { db_binary_operation("||", constant_1, constant_2, result, ec_no_error); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_lor */ @@ -4328,7 +4380,9 @@ Do the addition operation on all types of float and imaginary values. } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("f+", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_fadd */ @@ -4363,7 +4417,9 @@ Do the subtraction operation on all types of float and imaginary values. } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("f-", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_fsubtract */ @@ -4406,7 +4462,9 @@ Do the multiplication operation on all types of float. } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("f*", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_fmultiply */ @@ -4456,7 +4514,9 @@ Do the division operation on all types of float. } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("f/", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_fdivide */ @@ -4515,8 +4575,10 @@ relational operator "op", and return a 0 or 1 integer in "result". (a_host_large_integer)result_value); #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation(db_operator_names[op], constant_1, constant_2, result, ec_no_error); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_fcompare */ @@ -4546,7 +4608,9 @@ combinations of fixed-point and integer values. } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("fx+", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_fxadd */ @@ -4575,7 +4639,9 @@ combinations of fixed-point and integer values. } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("fx-", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_fxsubtract */ @@ -4604,7 +4670,9 @@ combinations of fixed-point and integer values. } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("fx*", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_fxmultiply */ @@ -4639,7 +4707,9 @@ combinations of fixed-point and integer values. } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("fx/", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_fxdivide */ @@ -4679,8 +4749,10 @@ relational operator "op", and return a 0 or 1 integer in "result". (a_host_large_integer)result_value); #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation(db_operator_names[op], constant_1, constant_2, result, ec_no_error); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_fxcompare */ @@ -4722,8 +4794,10 @@ GNU C++ minimum and maximum operators ("?"). } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation(db_operator_names[op], constant_1, constant_2, result, ec_no_error); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_fgnu_min_max */ @@ -4760,7 +4834,9 @@ Do the addition operation on all types of complex. } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("x+", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_xadd */ @@ -4794,7 +4870,9 @@ Do the subtraction operation on all types of complex. } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("x-", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_xsubtract */ @@ -4827,7 +4905,9 @@ Do the multiplication operation on all types of complex. *err_severity = es_error; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("x*", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_xmultiply */ @@ -4924,7 +5004,9 @@ Do the division operation on all types of complex. } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("x/", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_xdivide */ @@ -4960,8 +5042,10 @@ thereof). (a_host_large_integer)result_value); #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation(db_operator_names[op], constant_1, constant_2, result, ec_no_error); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_xcompare */ @@ -5001,7 +5085,9 @@ Do the multiplication operation on two imaginary numbers (any precision). } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("j*", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_jmultiply */ @@ -5049,7 +5135,9 @@ Do the division of a real number by an imaginary number (any precision). } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation("j/", constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_jdivide */ @@ -5118,8 +5206,10 @@ preservation of negative zeroes. *err_severity = es_error; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation(db_operator_names[op], constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_real_imag_add_subtract */ @@ -5399,8 +5489,10 @@ detected, or *err_code == ec_no_error if everything went fine. } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ db_binary_operation(db_operator_names[op], constant_1, constant_2, result, *err_code); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ release_local_constant(&offset); } /* do_padd */ @@ -5504,6 +5596,7 @@ integral type, as in "(int)&x - (int)&x". } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { if (cannot_fold) { fprintf(f_debug, "do_pdiff: did not fold\n"); @@ -5511,6 +5604,7 @@ integral type, as in "(int)&x - (int)&x". db_binary_operation("pd", constant_1, constant_2, result, *err_code); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ release_local_constant(&offset_2); release_local_constant(&offset_1); @@ -5784,6 +5878,7 @@ set if the operation cannot be folded. (a_host_large_integer)result_value); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { if (cannot_fold) { fprintf(f_debug, "do_pcompare: did not fold\n"); @@ -5792,6 +5887,7 @@ set if the operation cannot be folded. constant_1, constant_2, result, *err_code); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ release_local_constant(&offset_1); release_local_constant(&offset_2); @@ -5837,10 +5933,12 @@ and *result is set to an integer 0 or 1 for the result. set_integer_value(&result->variant.integer_value, (a_host_large_integer)result_value); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { db_binary_operation(db_operator_names[op], constant_1, constant_2, result, ec_no_error); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* do_pmcompare */ @@ -6798,6 +6896,7 @@ through the usual interface because a field cannot be passed as a constant. } /* if */ done: #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "fold_field_selection: offset = "); if (is_constant) { @@ -6807,6 +6906,7 @@ through the usual interface because a field cannot be passed as a constant. } /* if */ fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* CHECKING */ release_local_constant(&offset); return is_constant; @@ -11889,6 +11989,7 @@ the folding mechanism is used as a way to validate argument values. } /* if */ release_local_constant(&result); #if DEBUG +/* GCOVR_EXCL_START */ if (folded && db_flag_is_set("folded_builtin")) { fprintf(f_debug, "folded builtin: "); db_constant(result_con); @@ -11905,6 +12006,7 @@ the folding mechanism is used as a way to validate argument values. fprintf(f_debug, "\n"); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return folded; } /* fold_gnu_builtin_function_call_if_possible */ @@ -12627,6 +12729,7 @@ static initialization. } /* is_static_init_constant */ #if DEBUG +/* GCOVR_EXCL_START */ unsigned long db_show_folding_fe_space_used(unsigned long grand_total) /* @@ -12636,6 +12739,7 @@ Display memory use for entities in front end memory in this file (folding.c). return grand_total; } /* db_show_folding_fe_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void folding_one_time_init(void) diff --git a/src/folding.h b/src/folding.h index 41c2fc3e89..e877749d67 100644 --- a/src/folding.h +++ b/src/folding.h @@ -290,7 +290,9 @@ a_boolean fold_constexpr_member_selection(an_expr_node_ptr expr, extern a_boolean is_static_init_constant(a_constant_ptr con); #if DEBUG +/* GCOVR_EXCL_START */ extern unsigned long db_show_folding_fe_space_used(unsigned long grand_total); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ extern void folding_one_time_init(void); diff --git a/src/func_def.c b/src/func_def.c index c28d7e0519..4e894190c7 100644 --- a/src/func_def.c +++ b/src/func_def.c @@ -114,9 +114,11 @@ Comments in asm functions are saved along with the normal tokens. /* Add a null terminator. */ body[pos_in_asm_func_body_buffer] = '\0'; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_flag_is_set("asm_function")) { fprintf(f_debug, "asm block: %s\n", body); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return body; @@ -815,9 +817,11 @@ pointer decay). #endif /* GENERATE_SOURCE_SEQUENCE_LISTS */ mark_variable_value_set(sym); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_symbol(sym, "Changed from parameter symbol: ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ if (vp->is_pack_element) { @@ -1590,6 +1594,7 @@ of lambda expressions. stack_ptr = &scope_stack[DEPTH_OF_FILE_SCOPE]; ssep = func_info->prototype_scope_ss_list; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { if (ssep != NULL) { fputs("scan_function_body: fixing up func prototype ss list:\n", @@ -1597,6 +1602,7 @@ of lambda expressions. db_ss_list(ssep); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ for (; ssep != NULL; ssep = next_ssep) { next_ssep = ssep->next; @@ -1613,11 +1619,13 @@ of lambda expressions. if (param_id->source_sequence_entry == ssep) break; } /* for */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fprintf(f_debug, "%sparam_id match for ", param_id == NULL ? "no " : ""); db_source_sequence_entry(ssep); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (param_id == NULL) { /* This source sequence entry is not associated with one of the @@ -2002,12 +2010,14 @@ of lambda expressions. } /* if */ #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { a_symbol_ptr sym = (a_symbol_ptr)rout_ptr->source_corresp.assoc_info; if (sym != NULL) { db_symbol(sym, "finished scanning body for ", 2); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* scan_function_body */ @@ -2517,12 +2527,14 @@ member declaration (allowed in some Microsoft modes only). #if EXTRA_SOURCE_POSITIONS_IN_IL update_decl_pos_info(&rp->source_corresp, decl_pos_block); #if DEBUG +/* GCOVR_EXCL_START */ if (decl_pos_block != NULL) { if (debug_level >= 3 || db_flag_is_set("dump_decl_pos_info")) { fprintf(f_debug, "decl-pos info for member function def\n"); db_decl_pos_info(sym); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ } /* if */ @@ -2618,9 +2630,11 @@ member declaration (allowed in some Microsoft modes only). *ext_sym = NULL; *linkage_ptr = idl_external; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_symbol(sym, "", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* define_member_function */ diff --git a/src/host_envir.c b/src/host_envir.c index 6fb0249327..e238076752 100644 --- a/src/host_envir.c +++ b/src/host_envir.c @@ -511,11 +511,13 @@ duplication. *include_path_boundary = prev_dnep2; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("incl_search_path")) { fprintf(f_debug, "Removing %s, which duplicates a %s incl\n", dnep2->dir_name, sys_includes_only ? "system" : "regular"); db_incl_search_path(); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (sys_includes_only) { /* Issue a warning if a directory was specified as both @@ -624,6 +626,7 @@ include files to the end of the search path lists. } /* add_default_include_search_path */ #if DEBUG +/* GCOVR_EXCL_START */ void db_incl_search_path(void) /* @@ -637,6 +640,7 @@ Display the include search path, for debugging purposes. } /* while */ } /* db_incl_search_path */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void change_primary_include_search_dir(a_const_char *dir_name) @@ -647,12 +651,14 @@ general memory. */ { #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("incl_search_path")) { fprintf(f_debug, "change_primary_include_search_dir: before changing %s to %s\n", incl_search_path->dir_name, dir_name); db_incl_search_path(); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ incl_search_path->dir_name = dir_name; embed_search_path->dir_name = dir_name; @@ -678,11 +684,13 @@ stack_referenced_include_directories to TRUE. */ { #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("incl_search_path")) { fprintf(f_debug, "push_primary_include_search_dir: pushing %s\n", dir_name); db_incl_search_path(); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* The "-I-" option disables these changes. */ if (put_dir_of_each_opened_source_file_on_incl_search_path) { @@ -701,11 +709,13 @@ stack_referenced_include_directories to TRUE. incl_search_path->system_include_dir = system_include_dir; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("incl_search_path")) { fprintf(f_debug, "push_primary_include_search_dir: after pushing %s\n", dir_name); db_incl_search_path(); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* push_primary_include_search_dir */ @@ -720,11 +730,13 @@ considered a system include directory. */ { #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("incl_search_path")) { fprintf(f_debug, "pop_primary_include_search_dir: popping to %s\n", dir_name); db_incl_search_path(); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* The "-I-" option disables these changes. */ if (put_dir_of_each_opened_source_file_on_incl_search_path) { @@ -752,11 +764,13 @@ considered a system include directory. incl_search_path->system_include_dir = system_include_dir; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("incl_search_path")) { fprintf(f_debug, "pop_primary_include_search_dir: after popping to %s\n", dir_name); db_incl_search_path(); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* pop_primary_include_search_dir */ @@ -1016,9 +1030,11 @@ be passed to the back end. (void)memcpy(&der_name[base_name_length], suffix, size_t_arg(suffix_length)); der_name[der_name_length] = '\0'; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "derived name = \"%s\".\n", der_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return(der_name); } /* derived_name */ @@ -1178,10 +1194,12 @@ necessary. This routine may be called iteratively. db_enter(5, "replace_file_name_suffix"); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("replace_file_name_suffix")) { fprintf(f_debug, "current file_name = \"%s\", new suffix = \"%s\"\n", file_name_buffer->buffer, new_suffix); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Determine the size of file_name, excluding the trailing NULL. */ new_suffix_length = strlen(new_suffix); @@ -1203,9 +1221,11 @@ necessary. This routine may be called iteratively. /* Terminate the string. */ add_char_to_text_buffer(file_name_buffer, '\0'); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("replace_file_name_suffix")) { fprintf(f_debug, "new file name = \"%s\"\n", file_name_buffer->buffer); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); #undef SUFFIX_DELIMITER @@ -1587,9 +1607,11 @@ file is not Unicode. FILE *temp_file; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("open_source_file") || debug_level >= 2) { fprintf(f_debug, "About to open %s\n", file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ *unicode_source_kind = usk_none; temp_file = fopen_with_result(file_name, FOPEN_MODE_FOR_READ, open_result); @@ -1736,9 +1758,11 @@ reason for the failure. char *mode; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 2) { fprintf(f_debug, "About to open input file %s\n", file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ mode = (char *)(binary_file ? FOPEN_MODE_FOR_BINARY_READ : FOPEN_MODE_FOR_READ); @@ -2053,10 +2077,12 @@ binary mode if binary_file is TRUE; otherwise, the file is opened textually. continue; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Opening temporary file %s\n", file_name.as_temp_characters()); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* A temporary file path has been computed, attempt to open the file. */ @@ -2125,10 +2151,12 @@ file. /* This function does not return from the above call. */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Opened temporary file %s\n", file_name.as_temp_characters()); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Create a FILE from the file descriptor. */ @@ -2164,10 +2192,12 @@ mode if binary_file is TRUE; otherwise, the file is opened textually. file_name.reset_to(a_string_view(temp_dir, temp_dir_len), "edg", temp_seed++, "_", (long)getpid()); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Opening temporary file %s\n", file_name.as_temp_characters()); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Check to see if the file exists already. If so, go on to the next @@ -2398,11 +2428,13 @@ Only write the signoff if there ARE errors, and if we are supposed to. a_diagnostic_counter diags_total = diagnostic_counters.total; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("module_report") && num_module_decls_attempted > 0) { fprintf(f_debug, "%lu modules declarations processed (%lu failed).\n", num_module_decls_attempted, num_module_decls_failed); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (diags_total.all_error_types() > 0) { a_diagnostic_counter diags_suppressed = diagnostic_counters.suppressed; @@ -3604,10 +3636,12 @@ Set module_id to the string and return it. str2 = NULL; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("module_id")) { fprintf(f_debug, "make_module_id: str1 = %s, str2 = %s\n", str1, str2 == NULL ? "NULL" : str2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ { /* The identifier is made of the primary source file name plus either the name of an externally defined variable or routine, @@ -3659,9 +3693,11 @@ Set module_id to the string and return it. module_id = mod_id; } #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("module_id")) { fprintf(f_debug, "make_module_id: final string = %s\n", module_id); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* If there are any functions whose lowering was delayed due to lack of a suitable module id, they can now be lowered (but can't be lowered @@ -4001,7 +4037,9 @@ of the host allocation granularity. DWORD bytes_written; HANDLE f_map; #if DEBUG +/* GCOVR_EXCL_START */ const char* failed_system_call = NULL; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ a_void_ptr map_address = (base_addr != NULL) ? (a_void_ptr)((char*)base_addr + curr_size) : NULL; @@ -4026,9 +4064,11 @@ of the host allocation granularity. large_file_offset.LowPart, incremental_size, map_address); #if DEBUG +/* GCOVR_EXCL_START */ if (addr == NULL) { failed_system_call = "MapViewOfFileEx"; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { addr = MapViewOfFile(f_map, FILE_MAP_WRITE, @@ -4036,26 +4076,33 @@ of the host allocation granularity. large_file_offset.LowPart, incremental_size); #if DEBUG +/* GCOVR_EXCL_START */ if (addr == NULL) { failed_system_call = "MapViewOfFile"; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* The handle for mapping is not needed after the view is obtained above. */ if (!CloseHandle(f_map)) { #if DEBUG +/* GCOVR_EXCL_START */ if (failed_system_call == NULL) { failed_system_call = "CloseHandle"; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ } else { failed_system_call = "CreateFileMapping"; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("mmap") || debug_level >= 4) { fprintf(f_debug, "map_memory_region_file: allocated %lu bytes of mmap memory " @@ -4065,18 +4112,24 @@ of the host allocation granularity. fprintf(f_debug, " requested address was: %p\n", map_address); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if DEBUG +/* GCOVR_EXCL_START */ } else { failed_system_call = "WriteFile"; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ } else { failed_system_call = "SetFilePointerEx"; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (failed_system_call != NULL && db_flag_is_set("mmap")) { DWORD err_code = GetLastError(); if (map_address != NULL) { @@ -4089,6 +4142,7 @@ of the host allocation granularity. fprintf(f_error, " %s() failed with error code %d\n", failed_system_call, err_code); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return addr; @@ -4122,6 +4176,7 @@ error). large_file_offset.HighPart, large_file_offset.LowPart, size, address); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("mmap") || debug_level >= 4) { fprintf(f_debug, "map_input_file_to_region: allocated %lu bytes of mmap memory at %p\n", @@ -4131,6 +4186,7 @@ error). fprintf(f_debug, "Map failed: address=%p, size=%lu, offset=%lu\n", address, (unsigned long)size, (unsigned long)offset); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (result_addr == NULL) { error_position = null_source_position; @@ -4298,6 +4354,7 @@ of the host page size. addr = mmap_posix(map_address, incremental_size, PROT_WRITE | PROT_READ, fileno(handle), file_offset); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("mmap") || debug_level >= 4) { fprintf(f_debug, "map_memory_region_file: allocated %lu bytes of mmap memory " @@ -4307,6 +4364,7 @@ of the host page size. fprintf(f_debug, " requested address was: %p\n", map_address); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -4361,6 +4419,7 @@ error). PROT_READ | PROT_WRITE, fd, offset); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("mmap") || debug_level >= 4) { fprintf(f_debug, "map_input_file_to_region: allocated %lu bytes of mmap memory at %p\n", @@ -4370,6 +4429,7 @@ error). fprintf(f_debug, "Map failed: address=%p, size=%lu, offset=%lu\n", address, (unsigned long)size, (unsigned long)offset); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (result_addr == NULL) { error_position = null_source_position; @@ -5331,10 +5391,12 @@ to the current directory. /* Terminate the string. */ add_char_to_text_buffer(buf, '\0'); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("normalize_dir_name")) { fprintf(f_debug, "normalize_dir_name in=%s out=%s\n", dir_name, buf->buffer); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return buf->buffer; } /* normalize_dir_name */ @@ -5982,10 +6044,12 @@ components. For a typical U.S. system, this will return add_to_text_buffer(locale_name_buffer, buf, chars); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("locale")) { fprintf(f_debug, "System default locale is %s\n", locale_name_buffer->buffer); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return locale_name_buffer->buffer; #undef TMP_BUF_SIZE diff --git a/src/host_envir.h b/src/host_envir.h index fae9c969d4..604ece7051 100644 --- a/src/host_envir.h +++ b/src/host_envir.h @@ -81,14 +81,18 @@ Consider the following use cases when employing these macros: */ #ifndef USE_INLINE_EXPANSION #if DEBUG +/* GCOVR_EXCL_START */ #define USE_INLINE_EXPANSION FALSE +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ #define USE_INLINE_EXPANSION TRUE #endif /* DEBUG */ #endif /* ifndef USE_INLINE_EXPANSION */ #ifndef USE_INLINING_HINTS #if DEBUG +/* GCOVR_EXCL_START */ #define USE_INLINING_HINTS FALSE +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ #define USE_INLINING_HINTS TRUE #endif /* DEBUG */ @@ -646,7 +650,9 @@ This must be TRUE for the --il_display command-line option to be enabled. #else /* !STANDALONE_IL_DISPLAY */ #ifndef NEED_IL_DISPLAY #if DEBUG +/* GCOVR_EXCL_START */ #define NEED_IL_DISPLAY TRUE +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ #define NEED_IL_DISPLAY FALSE #endif /* DEBUG */ @@ -1081,7 +1087,9 @@ able to handle a large call depth. */ #ifndef DEFAULT_MAX_DEPTH_CONSTEXPR_CALL #if DEBUG +/* GCOVR_EXCL_START */ #define DEFAULT_MAX_DEPTH_CONSTEXPR_CALL 256 +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ #define DEFAULT_MAX_DEPTH_CONSTEXPR_CALL 512 #endif /* DEBUG */ @@ -3434,9 +3442,11 @@ typedef unsigned an_open_file_flag_set; /* TRUE if an open failure should be reported as a command-line error. */ #if DEBUG +/* GCOVR_EXCL_START */ #define OFF_FORCE_ERROR 0x80000000u /* TRUE if the open operation should be considered to have failed. For debugging purposes. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* @@ -4212,7 +4222,9 @@ extern void set_cpu_time_limit(int seconds); #endif /* !EDG_WIN32 && !MULTIPLE_THREAD_COMPILATION */ #if DEBUG +/* GCOVR_EXCL_START */ extern void db_incl_search_path(void); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ EXTERN_THREAD a_boolean diff --git a/src/ifc_modules.h b/src/ifc_modules.h index 2b76fef389..6346bb447c 100644 --- a/src/ifc_modules.h +++ b/src/ifc_modules.h @@ -188,6 +188,7 @@ extern void ifc_modules_cleanup(); extern void ifc_modules_write_out(); #if DEBUG +/* GCOVR_EXCL_START */ extern a_string s_db_ifc_locator(a_module_entry_locator loc); @@ -205,6 +206,7 @@ extern void db_node_at_tsn(a_module_token_cache_ptr cache, extern void db_locus(const an_ifc_source_location &locus); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /*lint -restore*/ /* FIXME: temporary. */ diff --git a/src/ifc_modules_internal.h b/src/ifc_modules_internal.h index 13d9e86b6f..8500d2a7d5 100644 --- a/src/ifc_modules_internal.h +++ b/src/ifc_modules_internal.h @@ -444,10 +444,12 @@ extern void construct_node_unchecked(an_ifc_Node_type *result, an_ifc_Index_type idx); #if DEBUG +/* GCOVR_EXCL_START */ extern void db_decl_cache(an_ifc_decl_index decl_idx); extern void db_print_indent(unsigned amount); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ extern void ifc_modules_read_one_time_init(); diff --git a/src/ifc_modules_read.c b/src/ifc_modules_read.c index d48ace4d9f..2dcc37ce1a 100644 --- a/src/ifc_modules_read.c +++ b/src/ifc_modules_read.c @@ -282,7 +282,9 @@ struct an_ifc_input_state { void import_referenced_modules(a_boolean impl_unit_importing_self); void export_ifc_macros(); #if DEBUG +/* GCOVR_EXCL_START */ void db_ifc_scope(an_ifc_scope_offset scope); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ }; /* an_ifc_input_state */ @@ -398,8 +400,10 @@ does not compile with a possibly-misinterpreted IFC import). a_diagnostic_ptr diag = start_error(ec_ifc_requirement_failure, mod); #if DEBUG +/* GCOVR_EXCL_START */ add_diag_info(diag, ec_ifc_requirement_failure_fill_in, line_number, function, string); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ end_diagnostic(diag); @@ -462,9 +466,11 @@ Convert the given index value into a string representation. mod->resolved_file, "\")"); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { append_index_context(msg, idx); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return msg; } /* index_to_str */ @@ -815,6 +821,7 @@ lifetime of this object expires (whichever is sooner). } /* Do not add code here. */ #if DEBUG +/* GCOVR_EXCL_START */ else if (db_flag_is_set("ifc_srcpos")) { /* The IFC gave us a null source location locus value, emit a remark. */ an_ifc_partition_kind kind = to_partition_kind(idx.sort); @@ -828,6 +835,7 @@ lifetime of this object expires (whichever is sooner). print(dbg_msg, f_debug, /*end=*/"\n\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { hint_given = FALSE; @@ -2073,12 +2081,14 @@ cases. a_module_entity pending_entity = make_temporary_ifc_module_entity(index); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx") && cached_result == NULL) { a_string err_msg("Module entity initial lookup started for ", index_to_str(index)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ a_module_entity_stack_state mep_state(&pending_entity); @@ -2169,6 +2179,7 @@ cases. result = get_ifc_error_module_entity(index); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx") && cached_result == NULL) { a_string dbg_msg("Module entity lookup done ", index_to_str(index), " (", (void*)result, @@ -2176,6 +2187,7 @@ cases. print(dbg_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (cached_result == NULL) { a_module_entity_ptr side_effect_cache_result = @@ -4336,11 +4348,13 @@ field is encountered, an IL entity and symbol are created at that time. a_deferred_module_entry deferred_entry{scope, mel}; hdr->deferred_module_entries->entries.push_back(deferred_entry); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_symbols")) { (void)fprintf(f_debug, "Defer symbol creation for %s", loc->symbol_header->identifier); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* defer_symbol_creation */ @@ -4639,11 +4653,13 @@ corresponding template entity and update *kind with the associated entity kind. a_token_kind final_token = tok_error; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_def")) { fprintf(f_debug, "Reconstituted template declaration:\n"); db_tokens(cache); fprintf(f_debug, "\n---------------------\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ { a_module_entity_rescan rescan(cache, &final_token); @@ -4674,11 +4690,13 @@ kind with the associated entity kind. a_token_kind final_token = tok_error; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_def")) { fprintf(f_debug, "Reconstituted partial specialization declaration:\n"); db_tokens(cache); fprintf(f_debug, "\n---------------------\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ { a_module_entity_rescan rescan(cache, &final_token); @@ -4705,11 +4723,13 @@ associated entity kind. a_token_kind final_token = tok_error; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_def")) { fprintf(f_debug, "Reconstituted declaration:\n"); db_tokens(cache); fprintf(f_debug, "\n---------------------\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ { a_module_entity_rescan rescan(cache, &final_token); @@ -4722,6 +4742,7 @@ associated entity kind. } /* parse_cached_nonmember_decl */ #if DEBUG +/* GCOVR_EXCL_START */ template static void append_index_context(a_string &str, @@ -4750,6 +4771,7 @@ Append any useful identifying information about the index. } /* if */ } /* append_index_context */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ namespace { @@ -5650,11 +5672,13 @@ index information to the given symbol. from_lexical_index(ifc_index_for_curr_token); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Bound token resolved for ", index_to_str(decl_idx)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ associate_symbol_with_declaration(decl_idx, sym); @@ -6846,12 +6870,14 @@ can be found, return NULL. a_symbol_ptr result = NULL; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string dbg_msg("Parameter ref search started for ", index_to_str(decl_idx)); print(dbg_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (is_template_parameter(decl_idx)) { an_ifc_decl_parameter param_decl; @@ -6880,6 +6906,7 @@ can be found, return NULL. result = NULL; done: #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string dbg_msg("Parameter ref search done ", index_to_str(decl_idx), @@ -6887,6 +6914,7 @@ can be found, return NULL. print(dbg_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return result; } /* load_param_ref */ @@ -7261,12 +7289,14 @@ error occurs, return NULL. a_symbol_ptr result = NULL; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Entity ref resolution started for ", index_to_str(expr_idx)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ switch (expr_idx.sort) { case ifc_es_expr_named_decl: @@ -7376,12 +7406,14 @@ error occurs, return NULL. result = NULL; done: #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Entity ref resolution done for ", index_to_str(expr_idx)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return result; } /* load_ifc_entity_ref */ @@ -7640,12 +7672,14 @@ entity during parsing. cache_fn(cache, decl_idx); cache_token_with_index(cache, tok_ifc_decl, decl_idx); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Bound token cached for ", index_to_str(decl_idx)); print(err_msg, f_debug); } /* if */ ++num_module_decls_attempted; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* cache_bound_entity */ @@ -9296,12 +9330,14 @@ variable initializer. !display_module_import_diagnostics); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Variable initializer loading started for ", index_to_str(decl_idx)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ a_module_scope_push_kind @@ -9353,11 +9389,13 @@ variable initializer. cache_expr(&init_cache, init, /*cinfo=*/{}); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_def")) { fprintf(f_debug, "Variable initializer cache:\n"); db_tokens(&init_cache); fprintf(f_debug, "\n---------------------\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (init_cache.is_valid()) { an_ifc_object_traits_bitfield @@ -9433,12 +9471,14 @@ variable initializer. } /* if */ pop_module_declaration_context(scope_push_status); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Variable initializer loading done for ", index_to_str(decl_idx)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ return result; @@ -9484,12 +9524,14 @@ definition. !display_module_import_diagnostics); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Function def loading started for ", index_to_str(decl_idx)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ifc_function_bodies->mark_pending(rp); @@ -9528,12 +9570,14 @@ definition. pop_module_declaration_context(scope_push_status); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Function def loading done for ", index_to_str(decl_idx)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ return result; @@ -11452,12 +11496,14 @@ must refer to the canonical template. ifc_template_definitions->get_associated_ifc_decl(templ); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Template def loading started for ", index_to_str(def_decl_idx)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ifc_template_definitions->mark_pending(templ); @@ -11498,12 +11544,14 @@ must refer to the canonical template. based. */ pop_module_declaration_context(scope_push_status); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Template def loading done for ", index_to_str(def_decl_idx)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ return result; @@ -11536,12 +11584,14 @@ Note that templ must refer to the canonical template. an_ifc_decl_index primary_decl_idx = ifc_template_specializations->get_associated_ifc_decl(templ); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Template spec loading started for ", index_to_str(primary_decl_idx)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ifc_template_specializations->mark_pending(templ); @@ -11553,12 +11603,14 @@ Note that templ must refer to the canonical template. /* Consider the specializations successfully loaded. */ ifc_template_specializations->mark_finished(templ); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Template spec loading done for ", index_to_str(primary_decl_idx)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ return result; @@ -12331,12 +12383,14 @@ strongly preferred over calling this function directly. !display_module_import_diagnostics); #if DEBUG +/* GCOVR_EXCL_START */ ++num_module_decls_attempted; if (db_flag_is_set("ifc_idx")) { a_string msg("IL processing started for ", index_to_str(decl_idx)); print(msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ mep->imminent = TRUE; if (!validate(decl_idx)) { @@ -12382,11 +12436,13 @@ strongly preferred over calling this function directly. } /* if */ cache_decl(&cache, decl_idx, cache_info); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_def")) { fprintf(f_debug, "Reconstituted variable declaration:\n"); db_tokens(&cache); fprintf(f_debug, "\n---------------------\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!cache.is_valid()) { goto invalid; @@ -13281,7 +13337,9 @@ strongly preferred over calling this function directly. goto done; invalid: #if DEBUG +/* GCOVR_EXCL_START */ ++num_module_decls_failed; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ mep->invalid = TRUE; done: @@ -13295,11 +13353,13 @@ strongly preferred over calling this function directly. pop_module_declaration_context(scope_push_status); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string msg("IL processing done for ", index_to_str(decl_idx)); print(msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* process_decl_to_il_entity */ @@ -13824,7 +13884,9 @@ parsing; this is used to diagnose unprocessed tok_ifc_decl tokens. #endif /* CHECKING */ mem_mep->invalid = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ ++num_module_decls_failed; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* for */ @@ -13859,12 +13921,14 @@ Complete the definition of the class referred to by mep (if needed). check_assertion(mep->entity.kind == (an_il_entry_kind)iek_type && class_type != NULL); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Class completion started for ", index_to_str(decl_idx)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ an_ifc_scope_offset class_scope_offset = get_ifc_initializer(ids); @@ -13933,6 +13997,7 @@ Complete the definition of the class referred to by mep (if needed). } /* if */ cache_token(&cache, tok_semicolon); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_def")) { fprintf(f_debug, "Reconstituted class definition: "); if (unmangled_name_of(&class_type->source_corresp) != NULL) { @@ -13943,6 +14008,7 @@ Complete the definition of the class referred to by mep (if needed). db_tokens(&cache); fprintf(f_debug, "\n---------------------\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (cache.is_valid()) { a_boolean template_scope_pushed; @@ -14004,11 +14070,13 @@ Complete the definition of the class referred to by mep (if needed). pop_module_declaration_context(scope_push_status); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Class completion done for ", index_to_str(decl_idx)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* complete_definition_of_module_class */ @@ -14183,6 +14251,7 @@ otherwise, return an empty optional. } /* source_position_from_ifc_of */ #if DEBUG +/* GCOVR_EXCL_START */ a_string s_db_ifc_locator(a_module_entry_locator loc) /* @@ -14329,6 +14398,7 @@ Print the corresponding file and line number for the source location } /* if */ } /* db_locus */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static void merge_compatibility_severity(an_error_severity *result, @@ -14783,9 +14853,11 @@ calling this function; otherwise, file descriptor leaks may occur. goto invalid; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_modules")) { db_module(mod); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ { an_ifc_error_severity_checker checker(skip_module_version_check); @@ -14829,6 +14901,7 @@ calling this function; otherwise, file descriptor leaks may occur. a_string_view name_str_temp(name_str.as_temp_characters(), name_str.length()); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_modules")) { a_string dbg_msg("partition ", i, " \"", name_str, "\" offset 0x", (an_ifc_byte_offset_storage)get_ifc_offset(ip), @@ -14839,6 +14912,7 @@ calling this function; otherwise, file descriptor leaks may occur. print(dbg_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* FIXME: Do we need this assertion? */ check_assertion(get_ifc_cardinality(ip) != 0 && get_ifc_offset(ip) != 0); @@ -15106,11 +15180,13 @@ to this function. */ { #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string msg("IL deferral started for ", index_to_str(decl_idx)); print(msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ switch (decl_idx.sort) { case ifc_ds_decl_alias: @@ -15433,11 +15509,13 @@ invalid:; expect_error_str("expected errors for bad module entity deferral"); done:; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string msg("IL deferral done for ", index_to_str(decl_idx)); print(msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* defer_ifc_declaration */ @@ -15487,12 +15565,14 @@ the given scope. an_ifc_dir_index dir_idx = get_ifc_directive(barren_decl); #if DEBUG +/* GCOVR_EXCL_START */ ++num_module_decls_attempted; if (db_flag_is_set("ifc_idx")) { a_string msg("Directive processing started for ", index_to_str(dir_idx)); print(msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ensure_module_scope(scope, &scope_push_status); switch (dir_idx.sort) { @@ -15539,7 +15619,9 @@ the given scope. goto done; invalid: #if DEBUG +/* GCOVR_EXCL_START */ ++num_module_decls_failed; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ done: /* If a scope was pushed, scope popping should always occur. */ @@ -15547,11 +15629,13 @@ the given scope. pop_module_declaration_context(scope_push_status); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string msg("Directive processing done for ", index_to_str(dir_idx)); print(msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* process_ifc_directive */ @@ -16317,11 +16401,13 @@ no corresponding type, return an error type. a_type_ptr result = NULL; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Type resolution started for ", index_to_str(type_idx)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ switch (type_idx.sort) { case ifc_ts_type_base: @@ -16967,11 +17053,13 @@ no corresponding type, return an error type. use the invalid result case. */ check_assertion(result != NULL); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_idx")) { a_string err_msg("Type resolution done for ", index_to_str(type_idx)); print(err_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return result; } /* Type_loader::load_impl */ @@ -23698,10 +23786,12 @@ context to help inform decisions about what to cache. ifc_unexpected(module_of(cinfo.parameterizing_entity), err_msg.as_temp_characters()); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_def")) { db_tokens(templ_cache.as_canonical()); fprintf(f_debug, "\n---------------------\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ goto invalid; } /* if */ @@ -31035,11 +31125,13 @@ specialization entity and update *kind with the associated entity kind. a_token_kind final_token = tok_error; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_def")) { fprintf(f_debug, "Reconstituted explicit specialization declaration:\n"); db_tokens(cache); fprintf(f_debug, "\n---------------------\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_assertion(get_ifc_sort(decl) == ifc_ss_explicit); { @@ -31070,11 +31162,13 @@ kind. a_source_position template_kw_pos; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_def")) { fprintf(f_debug, "Reconstituted explicit instantiation declaration:\n"); db_tokens(cache); fprintf(f_debug, "\n---------------------\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_assertion(get_ifc_sort(decl) == ifc_ss_instantiation); @@ -31097,6 +31191,7 @@ kind. } /* parse_cached_explicit_instantiation */ #if DEBUG +/* GCOVR_EXCL_START */ void an_ifc_input_state::db_ifc_scope(an_ifc_scope_offset scope) /* @@ -31151,6 +31246,7 @@ and print the diff of the cached tokens. db_diff_token_caches(prev_cache.as_canonical(), new_cache.as_canonical()); } /* db_diff_decls */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static a_boolean record_pending_ifc_template_definition( @@ -31188,18 +31284,21 @@ definitions (and later replaced if a more complete definition is discovered). definition. */ if (is_template_defined(decl_idx)) { #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_redef")) { a_string decl_idxs(index_to_str(existing_decl), " replaced by ", index_to_str(decl_idx)); print(decl_idxs, f_debug); db_diff_decls(existing_decl, decl_idx); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ifc_template_definitions->associate_entity(templ, decl_idx); result = TRUE; } /* Do not add code here. */ #if DEBUG +/* GCOVR_EXCL_START */ else if (db_flag_is_set("ifc_redef")) { a_string decl_idxs("Keeping ", index_to_str(existing_decl), " instead of ", index_to_str(decl_idx), @@ -31208,6 +31307,7 @@ definitions (and later replaced if a more complete definition is discovered). print(decl_idxs, f_debug); db_diff_decls(existing_decl, decl_idx); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ return result; @@ -31315,6 +31415,7 @@ required). } /* finish_mep_processing */ #if DEBUG +/* GCOVR_EXCL_START */ namespace { @@ -31352,6 +31453,7 @@ Return the corresponding lexical IFC index kind. } /* namespace */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ template @@ -31390,7 +31492,9 @@ Given an IFC index, return the corresponding lexical index. result.index = idx.value; result.file = idx.file; #if DEBUG +/* GCOVR_EXCL_START */ result.reference_kind = get_lexical_ifc_kind(); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return result; } /* to_lexical_index */ @@ -31456,6 +31560,7 @@ been confirmed to exist and the path stored in midp. input_state_ptr->import_referenced_modules( midp->impl_unit_importing_self); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_modsrc")) { /* Generate a textual representation of the module file and print it. */ an_ifc_scope_offset scope = @@ -31463,6 +31568,7 @@ been confirmed to exist and the path stored in midp. input_state_ptr->db_ifc_scope(scope); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Indicate to the lookup routines that lazy symbols are in use. */ lazy_symbols_may_be_visible = TRUE; diff --git a/src/il.c b/src/il.c index 11db2ca050..9f90c6b05d 100644 --- a/src/il.c +++ b/src/il.c @@ -143,6 +143,7 @@ END_EDG_NAMESPACE BEGIN_EDG_NAMESPACE #if DEBUG +/* GCOVR_EXCL_START */ #if !STANDALONE_UTILITY_PROGRAM /* @@ -151,6 +152,7 @@ Number of times the based_types lists of types are searched for related types. STATIC_THREAD unsigned long num_get_based_type_calls; #endif /* !STANDALONE_UTILITY_PROGRAM */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* @@ -246,12 +248,14 @@ STATIC_THREAD a_constant_ptr initialized. */ #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_shareable_constants, num_func_shareable_constants, num_used_shareable_constant_buckets, num_searches_for_shareable_constants, num_compares_for_shareable_constants; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* @@ -270,11 +274,14 @@ typedef struct a_based_type_fixup { } a_based_type_fixup; #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_based_type_fixups_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if DEBUG +/* GCOVR_EXCL_START */ void db_template_arg_list(a_template_arg_ptr tap) /* @@ -399,6 +406,7 @@ template arguments on template classes. db_name_full(sc, iek_none); } /* db_name */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* !STANDALONE_UTILITY_PROGRAM */ @@ -412,6 +420,7 @@ Output a string into the db_name_str buffer. } /* put_str_into_text_buffer */ #if DEBUG +/* GCOVR_EXCL_START */ /* Buffer into which names are written for db_name_str @@ -533,9 +542,11 @@ entity is not from the primary translation unit. return db_name_str_full(scp, kind, /*include_func_params=*/TRUE); } /* db_name_str */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if !STANDALONE_UTILITY_PROGRAM #if DEBUG +/* GCOVR_EXCL_START */ void subst_fail_intercept(void) /* @@ -3255,6 +3266,7 @@ Dump statements recursively (to a pre-set limit). db_statement_list(statement, 0, "", 10); } /* db_statements */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void set_inline_flag(a_routine_ptr rp, @@ -3595,6 +3607,7 @@ necessary. } /* build_seq_number_lookup_table */ #if DEBUG +/* GCOVR_EXCL_START */ void db_seq_number_lookup_table(void) /* @@ -3662,6 +3675,7 @@ of the translation unit. at_end_of_source); } /* db_source_file_for_seq_info */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if !STANDALONE_UTILITY_PROGRAM @@ -3673,9 +3687,11 @@ Change the current IL memory region to "region_number". { curr_il_region_number = region_number; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Switching to IL region %d.\n", curr_il_region_number); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* switch_il_region */ @@ -3804,12 +3820,14 @@ memory region and a pointer to it is returned. sp->prev = top_scope; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("new_function_scope")) { db_scope(sp); fprintf(f_debug, ", region=%ld, function_def=%ld\n", (long)assoc_routine->memory_region, (long)assoc_routine->function_def_number); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return sp; } /* new_function_scope */ @@ -3851,12 +3869,14 @@ is used. a_seq_number_lookup_entry_ptr snlep; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("seq_number_lookup")) { fprintf(f_debug, "Created seq lookup %lu for file %s seq %lu line %lu\n", il_header.num_seq_number_lookup_entries, source_file->file_name, (unsigned long)seq_number,(unsigned long)line_number); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (curr_seq_number_lookup_entry != NULL && curr_seq_number_lookup_entry->first == seq_number) { @@ -3953,6 +3973,7 @@ a file that contains metadata). db_enter(5, "record_start_of_source_file"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "file = \"%s\", seq = %lu\n", file_name, (unsigned long)seq_number); @@ -3995,6 +4016,7 @@ a file that contains metadata). curr_translation_unit->is_partially_sequenced = TRUE; } #endif /* EXPENSIVE_CHECKING */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Allocate the new file block. */ *new_file = sfp = alloc_source_file(); @@ -4246,9 +4268,11 @@ by recording that the last sequence number contained therein is seq_number. { db_enter(5, "record_end_of_source_file"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "seq = %lu\n", (unsigned long)seq_number); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ curr_file->last_seq_number = seq_number; /* Clear the cached sequence number conversion information. */ @@ -4267,6 +4291,7 @@ by recording that the last sequence number contained therein is seq_number. #endif /* !STANDALONE_UTILITY_PROGRAM */ #if DEBUG +/* GCOVR_EXCL_START */ void db_indent(size_t indent) /* Indent the current line by "indent" characters. @@ -4297,6 +4322,7 @@ Display the sequence number information associated with a source file. } /* if */ } /* for */ } /* db_source_file_seq_info */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -4316,9 +4342,11 @@ Convert a sequence number into the containing primary source file. #if CHECKING if (curr_file == NULL) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level > 0) { fprintf(f_debug, "seq number = %lu\n", (unsigned long)seq_number); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("find_file_for_seq: bad seq number"); } /* if */ @@ -4362,6 +4390,7 @@ number conversions. seq_cache.physical_line = physical_line; seq_cache.source_file = source_file; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Cached source sequence conversion information:\n"); fprintf(f_debug, " file=%s\n", source_file->file_name); @@ -4372,6 +4401,7 @@ number conversions. fprintf(f_debug, " line_offset: %ld\n", seq_cache.line_offset); fprintf(f_debug, " physical_line: %d\n", seq_cache.physical_line); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* update_seq_cache */ @@ -4625,9 +4655,11 @@ physical line position for the sequence number. db_enter(5, "source_file_for_seq"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { db_source_file_seq_info(il_header.primary_source_file, 0); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ *at_end_of_source = FALSE; *line_number = 0; @@ -4656,12 +4688,14 @@ physical line position for the sequence number. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5 || db_flag_is_set("source_file_for_seq")) { fprintf(f_debug, "File=%s, Line=%lu, sequence number=%lu\n", curr_file == NULL ? "" : curr_file->file_name, (unsigned long)*line_number, (unsigned long)seq_number); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return curr_file; @@ -4702,6 +4736,7 @@ number to 0. Return the source file pointer associated with seq_number. *full_name = proper_file->full_name; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { if (*line_number == 0) { fprintf(f_debug, "seq %lu is outside of all source.\n", @@ -4713,6 +4748,7 @@ number to 0. Return the source file pointer associated with seq_number. if (*at_end_of_source) fprintf(f_debug, "(really: at end of source)\n"); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return proper_file; @@ -4746,6 +4782,7 @@ or not. Return TRUE if so, FALSE otherwise. #endif /* !STANDALONE_UTILITY_PROGRAM */ #if DEBUG +/* GCOVR_EXCL_START */ a_line_number db_line_for_seq(a_seq_number seq_number) /* @@ -4763,6 +4800,7 @@ print the file name and line number. return line_number; } /* db_line_for_seq */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if !STANDALONE_UTILITY_PROGRAM @@ -5173,8 +5211,10 @@ STATIC_THREAD a_copy_remap_entry_ptr /* Copy remap entries freed and available for reuse. */ #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_copy_remap_entries_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* @@ -5212,7 +5252,9 @@ the entry to the remapped_entries list of the control block cblock. /* Allocate a new entry. */ crep = (a_copy_remap_entry_ptr)alloc_fe(sizeof(a_copy_remap_entry)); #if DEBUG +/* GCOVR_EXCL_START */ num_copy_remap_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Clear the entry and add it to the front of the remapped_entries list. */ @@ -7983,10 +8025,12 @@ Return the hash value for the indicated constant. hash_value += hash_type(cp->type); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "hash_constant, hash_value = %u\n", (unsigned int)hash_value); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return hash_value; } /* hash_constant */ @@ -8260,8 +8304,10 @@ are done. a_boolean eq = FALSE; an_itf_flag_set itf_options; #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD size_t db_level = 0; db_level++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ itf_options = itf_flags_for_cc_options(options); @@ -8681,6 +8727,7 @@ are done. } /* if */ done: #if DEBUG +/* GCOVR_EXCL_START */ db_level--; if (!eq && db_flag_is_set("compare_expressions") && node1 != NULL) { fprintf(f_debug, "compare_expressions:\n"); @@ -8696,6 +8743,7 @@ are done. fprintf(f_debug, "\n"); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return eq; } /* compare_expressions */ @@ -9909,7 +9957,9 @@ put it on a list of constants). a_constant_ptr *list_ptr; #if DEBUG +/* GCOVR_EXCL_START */ num_searches_for_shareable_constants++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if DO_IL_LOWERING && ASSIGN_STRING_LITERAL_SEQUENCE_NUMBERS if (cp->kind == (a_constant_repr_kind)ck_string && @@ -10000,7 +10050,9 @@ put it on a list of constants). scp != NULL; prev_scp = scp, scp = scp->next) { #if DEBUG +/* GCOVR_EXCL_START */ num_compares_for_shareable_constants++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Compare the constant in the list with the desired constant. */ if (identical_constants(scp, cp)) { @@ -10031,6 +10083,7 @@ put it on a list of constants). copy_constant(cp, scp); fix_memory_region_problems_in_copied_constant(scp); #if DEBUG +/* GCOVR_EXCL_START */ if (list_ptr != NULL) { if (alloc_in_function_scope) { num_func_shareable_constants++; @@ -10041,6 +10094,7 @@ put it on a list of constants). } /* if */ } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ if (list_ptr != NULL) { @@ -10075,7 +10129,9 @@ result of a string literal, but, e.g., of a call to a built-in function). scp != NULL; prev_scp = scp, scp = scp->next) { #if DEBUG +/* GCOVR_EXCL_START */ num_compares_for_shareable_constants++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Compare the constant in the list with the desired constant. */ if (identical_constants(scp, cp)) { @@ -10099,11 +10155,13 @@ result of a string literal, but, e.g., of a call to a built-in function). (void)strcpy((char*)scp->variant.string.value, cp->variant.string.value); fix_memory_region_problems_in_copied_constant(scp); #if DEBUG +/* GCOVR_EXCL_START */ check_assertion(list_ptr != NULL); num_shareable_constants++; if (*list_ptr == NULL) { num_used_shareable_constant_buckets++; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ check_assertion(list_ptr != NULL); @@ -11325,6 +11383,7 @@ There must be a derivation so marked. #if !STANDALONE_UTILITY_PROGRAM #if DEBUG +/* GCOVR_EXCL_START */ static a_base_class_derivation_ptr direct_virtual_derivation_of( a_base_class_ptr bcp) /* @@ -11343,6 +11402,7 @@ set to TRUE. } /* while */ return bcdp; } /* direct_virtual_derivation_of */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -11900,11 +11960,13 @@ rather than determined directly. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_type_lists")) { fprintf(f_debug, "Added to types list: "); db_abbreviated_type(type_ptr); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* add_to_types_list */ @@ -11989,11 +12051,13 @@ determined directly. type_ptr->next = NULL; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_type_lists")) { fprintf(f_debug, "Moved to end of list: "); db_abbreviated_type(type_ptr); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* move_to_end_of_types_list */ @@ -13365,6 +13429,7 @@ std::strong_ordering::equal, etc. } /* initialize_ordering_constants */ #if DEBUG +/* GCOVR_EXCL_START */ void db_based_types(a_type_ptr tp) /* @@ -13380,6 +13445,7 @@ Print the "based types" associated with the given type to the debug output. } /* for */ } /* db_based_types */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void do_based_type_fixup(void) @@ -13457,7 +13523,9 @@ that points to base_type. If none is found, create one and add it to the list. /* Falling through means a match was not found. */ btfp = (a_based_type_fixup_ptr)alloc_fe(sizeof(a_based_type_fixup)); #if DEBUG +/* GCOVR_EXCL_START */ num_based_type_fixups_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ btfp->base_type = base_type; /* Add the entry to the start of the list. */ @@ -13503,7 +13571,9 @@ frequently-asked-for based types at the front of the list. #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ num_get_based_type_calls++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if MICROSOFT_EXTENSIONS_ALLOWED ptr = (kind == (a_based_type_kind)btk_pointer); @@ -14488,12 +14558,14 @@ qual_pos must be non-NULL. #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ref_to_ref")) { fprintf(f_debug, "Ref-to-ref resulted in (line %lu): ", (unsigned long)pos_curr_token.seq); db_type(result); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ return result; @@ -18677,6 +18749,7 @@ STATIC_THREAD sizeof_t #define MAX_N_SCHEDULED_ROUTINE_MOVES 100 #if DEBUG +/* GCOVR_EXCL_START */ void db_scheduled_routine_moves(void) /* @@ -18694,6 +18767,7 @@ Display the current list of moves to perform. } /* for */ } /* db_scheduled_routine_moves */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static a_boolean compare_routine_move(a_routine_move_descr const &x, @@ -28016,11 +28090,13 @@ related to "needed" flags. rout->defined = TRUE; #if MAINTAIN_NEEDED_FLAGS #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("needed_flags", rout, iek_routine)) { fprintf(f_debug, "Setting defined on rout "); db_name_full(&rout->source_corresp, iek_routine); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* If the definition_needed flag was set previously, set it again so the function body will be scanned. The fact that rout->defined was @@ -28386,6 +28462,7 @@ appropriate scope on the scope stack (as specified by pragma_scope_depth). pp->is_microsoft_pragma_operator = is_microsoft_pragma_operator; #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("add_pragma_to_il")) { fprintf(f_debug, "Adding non-entity pragma at seq=%u, col=%u to scope %d " @@ -28394,6 +28471,7 @@ appropriate scope on the scope stack (as specified by pragma_scope_depth). scope_stack[pragma_scope_depth].number, pragma_scope_depth); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ append_pragma(scope_stack[pragma_scope_depth].il_scope, scope_stack[pragma_scope_depth].assoc_pointers_block, @@ -28477,6 +28555,7 @@ be set appropriately. pp->entity.kind = entity_kind; pp->entity.ptr = entity_ptr; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("add_pragma_to_il")) { fprintf(f_debug, "Adding entity pragma at seq=%u, col=%u to scope %d " @@ -28484,6 +28563,7 @@ be set appropriately. pp->position.seq, (unsigned)pp->position.column, il_scope->number, il_scope->depth_in_scope_stack); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ append_pragma(il_scope, pointers_block, pp); if (region_to_switch_back_to != NO_MEMORY_REGION_NUMBER) { @@ -28733,9 +28813,11 @@ node instead. dynamic init entry to its destructions list. */ add_to_destructions_list(dip, olp); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { db_pending_destructions(dip, (an_object_lifetime_ptr)NULL); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ db_exit(); @@ -28829,6 +28911,7 @@ object lifetime. } /* promote_lifetime_contents_to_curr_object_lifetime */ #if DEBUG +/* GCOVR_EXCL_START */ void db_destruction(a_dynamic_init_ptr dip) /* @@ -29044,6 +29127,7 @@ destructions under it. } /* if */ } /* db_object_lifetime_tree */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void free_object_lifetime(an_object_lifetime_ptr olp) @@ -29221,9 +29305,11 @@ lifetimes, since those are never bound. *lifetime_addr = olp; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_lifetimes")) { db_object_lifetime_with_indentation(olp, "Binding: "); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* bind_object_lifetime */ @@ -29348,14 +29434,18 @@ entry is needed.) } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_lifetimes")) { db_object_lifetime_with_indentation(olp, "Push or repush: "); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Now set the new entry to be the current object lifetime. */ curr_object_lifetime = olp; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) db_object_lifetime_stack(); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* push_or_repush_object_lifetime */ @@ -29733,10 +29823,12 @@ okay if a lifetime being left in the IL is not bound to an IL entry. db_enter(3, "pop_object_lifetime_full"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fputs("curr_object_lifetime = ", f_debug); db_object_lifetime(curr_object_lifetime); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ olp = curr_object_lifetime; /* Pop the lifetime entry -- that is, update curr_object_lifetime to @@ -29757,12 +29849,14 @@ okay if a lifetime being left in the IL is not bound to an IL entry. modify all related pointers and then return it to an available list. */ if (is_useless_object_lifetime(olp)) { #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_lifetimes")) { if (olp->kind != (an_object_lifetime_kind)olk_expr_temporary || long_lifetime_temps) { db_object_lifetime_with_indentation(olp, "Discarding: "); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Unlink the object lifetime entry from its parent, children, and siblings. */ @@ -29845,15 +29939,19 @@ okay if a lifetime being left in the IL is not bound to an IL entry. olp->parent_lifetime->has_implicit_child = TRUE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_lifetimes")) { db_object_lifetime_with_indentation(olp, "Keeping: "); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_flag_is_set("dump_lifetimes")) { db_object_lifetime_stack(); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit() return is_retained_in_il; @@ -29878,6 +29976,7 @@ olk_block_after_label. } /* innermost_block_object_lifetime */ #if DEBUG +/* GCOVR_EXCL_START */ void db_scope(a_scope_ptr sp) /* @@ -29984,6 +30083,7 @@ purposes. indent indicates the indentation level. } /* for */ } /* db_type_lists */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* !STANDALONE_UTILITY_PROGRAM */ #if !STANDALONE_UTILITY_PROGRAM @@ -30278,11 +30378,13 @@ eliminate_unneeded_scope_orphaned_list_entries). a_memory_region_number n; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_trace("dump_elim", rp, iek_routine)) { fprintf(f_debug, "Removing function body for "); db_name_full(&rp->source_corresp, iek_routine); fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Reset the routine entry to undefined state. (Note that the corresponding symbol remains marked as "defined" so that @@ -30377,16 +30479,19 @@ list of its parent. If olp is NULL, do nothing. olp->next = NULL; olp->parent_destruction_sublist = NULL; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("lifetime unlinked:\n", f_debug); db_object_lifetime(olp); db_object_lifetime(parent); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* detach_from_object_lifetime_tree */ #if DEBUG +/* GCOVR_EXCL_START */ void db_class_list(a_class_list_entry_ptr list) /* @@ -30446,6 +30551,7 @@ Display a class list for debugging purposes. } /* if */ } /* db_classes_in_list */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if MAINTAIN_NEEDED_FLAGS @@ -30480,6 +30586,7 @@ friends pointer in class_type's type supplement will also be cleared. /* This class was removed from the IL already. */ check_assertion(!il_entry_prefix_of(friend_class).keep_in_il); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_trace("dump_elim", friend_class, iek_type)) { fputs(" Befriended ", f_debug); @@ -30487,6 +30594,7 @@ friends pointer in class_type's type supplement will also be cleared. fputs(" is already eliminated", f_debug); fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { /* Go through the list of classes that have specified friend_class @@ -30504,6 +30612,7 @@ friends pointer in class_type's type supplement will also be cleared. prev_clep->next = next_clep; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_trace("dump_elim", friend_class, iek_type) || db_trace("friendship", friend_class, iek_type)) { @@ -30516,6 +30625,7 @@ friends pointer in class_type's type supplement will also be cleared. db_class_list(friend_ctsp->befriending_classes); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Break out of the inner loop and continue the outer loop, moving to the next class declared as a friend of class_type. */ @@ -30527,6 +30637,7 @@ friends pointer in class_type's type supplement will also be cleared. #if CHECKING if (clep == NULL) { #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "class type: "); db_abbreviated_type(class_type); fprintf(f_debug, "\nfriend class: "); @@ -30534,6 +30645,7 @@ friends pointer in class_type's type supplement will also be cleared. fprintf(f_debug, "\n"); fprintf(f_debug, "befriending_classes of friend class:\n"); db_class_list(friend_ctsp->befriending_classes); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str2( "eliminate_references_from_befriended_entities", @@ -30554,6 +30666,7 @@ friends pointer in class_type's type supplement will also be cleared. if (clep->class_type == class_type) { /* A match -- link around it. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_trace("dump_elim", friend_rout, iek_routine) || db_trace("friendship", friend_rout, iek_routine)) { @@ -30567,6 +30680,7 @@ friends pointer in class_type's type supplement will also be cleared. db_class_list(rout_befriending_classes(friend_rout)); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (prev_clep == NULL) { friend_rout->friends_or_originator.befriending_classes = next_clep; @@ -30583,6 +30697,7 @@ friends pointer in class_type's type supplement will also be cleared. #if CHECKING if (clep == NULL) { #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "class type: "); db_abbreviated_type(class_type); fprintf(f_debug, "\nfriend rout: "); @@ -30590,6 +30705,7 @@ friends pointer in class_type's type supplement will also be cleared. fprintf(f_debug, "\n"); fprintf(f_debug, "befriending_classes of friend rout:\n"); db_class_list(rout_befriending_classes(friend_rout)); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str2( "eliminate_references_from_befriended_entities", @@ -30617,6 +30733,7 @@ friends pointer in class_type's type supplement will also be cleared. prev_clep->next = next_clep; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_trace("dump_elim", friend_template, iek_template)) { db_template_name(friend_template); @@ -30628,6 +30745,7 @@ friends pointer in class_type's type supplement will also be cleared. db_class_list(friend_tssp->befriending_classes); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Break out of the inner loop and continue the outer loop, moving to the next class declared as a friend of class_type. */ @@ -30639,6 +30757,7 @@ friends pointer in class_type's type supplement will also be cleared. #if CHECKING if (clep == NULL) { #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "class type: "); db_abbreviated_type(class_type); fprintf(f_debug, "\nfriend template: "); @@ -30646,6 +30765,7 @@ friends pointer in class_type's type supplement will also be cleared. fprintf(f_debug, "\n"); fprintf(f_debug, "befriending_classes of friend template:\n"); db_class_list(friend_tssp->befriending_classes); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str2( "eliminate_references_from_befriended_entities", @@ -30690,9 +30810,11 @@ some attribute of the type tree. check_assertion(olp != NULL); detach_from_object_lifetime_tree(olp); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_flag_is_set("dump_elim")) { fputs("Unlinking default arg object lifetime\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Avoid processing this default argument more than once. */ ptp->default_arg_expr = NULL; @@ -30942,18 +31064,22 @@ entry into one representing a nondefining declaration. { db_enter(4, "turn_class_definition_into_declaration"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_trace("dump_elim", class_type, iek_type)) { fputs("Removing definition of ", f_debug); db_abbreviated_type(class_type); fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if CHECKING if (class_definition_needed_flag_is_set(class_type)) { #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "Class type: "); db_abbreviated_type(class_type); fprintf(f_debug, "\n"); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("turn_class_definition_into_declaration: class def needed"); } /* if */ @@ -31113,12 +31239,14 @@ keep_in_il because, for example, they appear on orphan lists. for (vp = solhp->orphaned_variables; vp != NULL; vp = next_vp) { next_vp = vp->next; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_trace("dump_elim", vp, iek_variable)) { fprintf(f_debug, "%semoving orphaned variable ", il_entry_prefix_of(vp).keep_in_il ? "Not r" : "R"); db_name_full(&vp->source_corresp, iek_variable); fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!il_entry_prefix_of(vp).keep_in_il) { /* Remove it from the variables list by linking around it. */ @@ -31139,12 +31267,14 @@ keep_in_il because, for example, they appear on orphan lists. next_tp = tp->next; keep = type_is_to_be_kept_in_il(tp); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_trace("dump_elim", tp, iek_type)) { fprintf(f_debug, "%semoving orphaned type ", keep ? "Not r" : "R"); db_abbreviated_type(tp); fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!keep) { /* Remove it from the types list by linking around it. */ @@ -31163,12 +31293,14 @@ keep_in_il because, for example, they appear on orphan lists. for (na = solhp->orphaned_namespaces; na != NULL; na = next_na) { next_na = na->next; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_trace("dump_elim", na, iek_namespace)) { fprintf(f_debug, "%semoving orphaned namespace ", il_entry_prefix_of(na).keep_in_il ? "Not r" : "R"); db_name_full(&vp->source_corresp, iek_namespace); fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!il_entry_prefix_of(na).keep_in_il) { /* Remove it from the namespaces list by linking around it. */ @@ -31418,12 +31550,14 @@ eliminated, if appropriate. for (vp = scope->variables; vp != NULL; vp = next_vp) { next_vp = vp->next; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_trace("dump_elim", vp, iek_variable)) { fprintf(f_debug, "%semoving variable ", il_entry_prefix_of(vp).keep_in_il ? "Not r" : "R"); db_name_full(&vp->source_corresp, iek_variable); fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!il_entry_prefix_of(vp).keep_in_il) { /* Remove any object lifetimes that may be associated with its default @@ -31453,12 +31587,14 @@ eliminated, if appropriate. for (rp = scope->routines; rp != NULL; rp = next_rp) { next_rp = rp->next; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_trace("dump_elim", rp, iek_routine)) { fprintf(f_debug, "%semoving routine ", il_entry_prefix_of(rp).keep_in_il ? "Not r" : "R"); db_name_full(&rp->source_corresp, iek_routine); fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!il_entry_prefix_of(rp).keep_in_il) { /* Remove any object lifetimes that may be associated with its default @@ -31491,6 +31627,7 @@ eliminated, if appropriate. next_tp = tp->next; keep = type_is_to_be_kept_in_il(tp); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_trace("dump_elim", tp, iek_type)) { fprintf(f_debug, "%semoving ", keep ? "Not r" : "R"); @@ -31501,6 +31638,7 @@ eliminated, if appropriate. } /* if */ fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!keep) { /* Remove it from the types list by linking around it. */ @@ -31542,6 +31680,7 @@ eliminated, if appropriate. for (hnp = scope->hidden_names; hnp != NULL; hnp = next_hnp) { next_hnp = hnp->next; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_trace("dump_elim", hnp->entity.ptr, (an_il_entry_kind)hnp->entity.kind)) { @@ -31556,6 +31695,7 @@ eliminated, if appropriate. } /* if */ fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!il_entry_prefix_of(hnp->entity.ptr).keep_in_il) { if (prev_hnp == NULL) { @@ -32479,6 +32619,7 @@ Given a routine pointer, return the list of parameter types. } /* get_routine_param_types */ #if DEBUG +/* GCOVR_EXCL_START */ unsigned long show_il_space_used(void) /* @@ -32517,6 +32658,7 @@ Display and return the amount of space used for various IL tables. return grand_total; } /* show_il_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if UPC_EXTENSIONS_ALLOWED @@ -33152,7 +33294,9 @@ node, and report any failure as an internal error. /* At least one of the operands is an lvalue when an rvalue is expected or vice-versa. */ #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("is_lvalue incorrectly set"); } /* if */ @@ -33162,7 +33306,9 @@ node, and report any failure as an internal error. if (op == (an_expr_operator_kind)eok_cast && is_pointer_type(expr->type) && is_array_type(operand_1->type)) { #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("eok_cast used for array-to-ptr decay"); } /* if */ @@ -33203,8 +33349,10 @@ node, and report any failure as an internal error. } else { /* The flag is set incorrectly. */ #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); db_expression(op_node); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("result_is_not_used set wrong on operand"); } /* if */ @@ -33219,7 +33367,9 @@ node, and report any failure as an internal error. !pointer_type_is_consistent(expr->type, operand_1->type, /*targ_type_is_prvalue=*/FALSE)) { #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("wrong result type for &"); } /* if */ @@ -33228,7 +33378,9 @@ node, and report any failure as an internal error. !pointer_type_is_consistent(expr->type, operand_1->type, /*targ_type_is_prvalue=*/FALSE)) { #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("wrong result type for %"); } /* if */ @@ -33239,7 +33391,9 @@ node, and report any failure as an internal error. expr->type, /*targ_type_is_prvalue=*/!is_glvalue_node(expr))) { #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("wrong result type for subscript"); } /* if */ @@ -33260,7 +33414,9 @@ node, and report any failure as an internal error. operand_1->type, result_type, /*targ_type_is_prvalue=*/!is_glvalue_node(expr))) { #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("wrong result type for *"); } /* if */ @@ -33301,7 +33457,9 @@ node, and report any failure as an internal error. is_template_dependent_type(op_type_2))) { /* The types of the two operands must be consistent. */ #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("types for operation are not consistent"); } /* if */ @@ -33322,7 +33480,9 @@ node, and report any failure as an internal error. if (expr->variant.operation.type_kind != (a_type_kind)tk_vector || !is_vector_type(expr->type)) { #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("types for vector operation are not consistent"); } /* if */ @@ -33333,7 +33493,9 @@ node, and report any failure as an internal error. C_mode()) { /* These operations should only appear in C++ mode. */ #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("vector operation in wrong mode"); } /* if */ @@ -33501,6 +33663,7 @@ instantiation, a nonreal instantiation, or a template-dependent type. #if !STANDALONE_UTILITY_PROGRAM #if DEBUG +/* GCOVR_EXCL_START */ unsigned long db_show_il_c_fe_space_used(unsigned long grand_total) /* @@ -33518,6 +33681,7 @@ Display memory use for entities in front end memory in this file (il.c). return grand_total; } /* db_show_il_c_fe_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -33777,6 +33941,7 @@ IL lowering. } /* if */ } /* for */ #if DEBUG +/* GCOVR_EXCL_START */ { unsigned long new_n_types = ((unsigned long)(next_type_reordering_slot - type_reordering)); if (new_n_types != n_types && @@ -33792,6 +33957,7 @@ IL lowering. } /* for */ } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_assertion( (unsigned long)(next_type_reordering_slot - type_reordering) == n_types); @@ -34225,8 +34391,10 @@ in il_init.) /* Initialize certain global variables declared in il.h. */ #if DEBUG +/* GCOVR_EXCL_START */ db_name_str_buffer = NULL; db_qualifiers_str_buffer = NULL; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Save variables from il.h and il.c that are needed for precompiled @@ -34302,6 +34470,7 @@ in il_init.) pch_saved_var_array_elem(max_upc_block_size), #endif /* UPC_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_searches_for_shareable_constants), pch_saved_var_array_elem(num_compares_for_shareable_constants), pch_saved_var_array_elem(num_func_shareable_constants), @@ -34310,6 +34479,7 @@ in il_init.) pch_saved_var_array_elem(num_used_shareable_constant_buckets), pch_saved_var_array_elem(num_based_type_fixups_allocated), pch_saved_var_array_elem(num_copy_remap_entries_allocated), +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pch_saved_var_array_elem(avail_copy_remap_entries), #if MODULE_ID_NEEDED @@ -34577,6 +34747,7 @@ of the front end. { last_routine_scope_variable_found = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_shareable_constants = 0; num_func_shareable_constants = 0; num_used_shareable_constant_buckets = 0; @@ -34585,6 +34756,7 @@ of the front end. num_get_based_type_calls = 0; num_based_type_fixups_allocated = 0; num_copy_remap_entries_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if UPC_EXTENSIONS_ALLOWED max_upc_block_size = MAX_UPC_BLOCK_SIZE; diff --git a/src/il.h b/src/il.h index 913487a57e..613d119346 100644 --- a/src/il.h +++ b/src/il.h @@ -3994,6 +3994,7 @@ extern a_scope_ptr scope_for_routine_or_null(a_routine_ptr rout); extern a_scope_ptr scope_for_routine(a_routine_ptr rout); #if DEBUG +/* GCOVR_EXCL_START */ extern void db_indent(size_t indent); extern void db_template_arg_list(a_template_arg_ptr tap); @@ -4129,6 +4130,7 @@ extern void put_str_to_f_debug(a_const_char *str, an_il_to_str_output_control_block_ptr octl); extern void subst_fail_intercept(void); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* @@ -4137,8 +4139,10 @@ In DEBUG configurations, this also calls subst_fail_intercept, to ease tracking of substitution failures in a debugger. */ #if DEBUG +/* GCOVR_EXCL_START */ /*lint -emacro(505,subst_fail)*/ #define subst_fail(x) (subst_fail_intercept(), (x) = TRUE) +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ #define subst_fail(x) ((x) = TRUE) #endif /* DEBUG */ diff --git a/src/il_alloc.c b/src/il_alloc.c index c9c2fa6b7d..c4c397b9b7 100644 --- a/src/il_alloc.c +++ b/src/il_alloc.c @@ -31,6 +31,7 @@ BEGIN_EDG_NAMESPACE #if !STANDALONE_UTILITY_PROGRAM #if DEBUG +/* GCOVR_EXCL_START */ using an_allocation_counter = unsigned long; /* The type used for an allocation count. */ @@ -114,6 +115,7 @@ Track an allocation of an IL entry with the given IL entry kind. ++il_allocation_counter[kind]; } /* f_tally_alloc */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Static variable and macro for quickly initializing the source_corresp @@ -171,8 +173,10 @@ Macro to increment the entry prefix allocation count only if DEBUG is TRUE. Used in do_alloc. */ #if DEBUG +/* GCOVR_EXCL_START */ #define incr_num_il_entry_prefixes_allocated() \ num_il_entry_prefixes_allocated++ +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ #define incr_num_il_entry_prefixes_allocated() /* Nothing */ #endif /* DEBUG */ @@ -222,8 +226,10 @@ Macro to increment the count of translation unit copy address pointers allocated. When not generating debugging code, this expands to nothing. */ #if DEBUG +/* GCOVR_EXCL_START */ #define incr_num_trans_unit_copy_address_pointers_allocated() \ num_trans_unit_copy_address_pointers_allocated++ +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ #define incr_num_trans_unit_copy_address_pointers_allocated() /* Nothing */ #endif /* DEBUG */ @@ -339,7 +345,9 @@ to by trace_alloc_ptr. */ { #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "Created node at %p.\n", (void*)ptr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* alloc_intercept */ @@ -485,7 +493,9 @@ least in non-pcc mode). */ { #if DEBUG +/* GCOVR_EXCL_START */ string_literal_text_space_allocated += (unsigned long)size; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return alloc_il(size); } /* alloc_text_of_string_literal */ @@ -578,7 +588,9 @@ Allocate a source file entry, initialize it, and return a pointer to it. translation unit file scope memory region. */ sfp = (a_source_file_ptr)alloc_primary_file_scope_il(sizeof(a_source_file)); #if DEBUG +/* GCOVR_EXCL_START */ f_tally_alloc(iek_source_file); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ sfp->file_name = NULL; sfp->full_name = NULL; @@ -658,7 +670,9 @@ region if at_file_scope is TRUE. alloc_cil(sizeof(a_per_instantiation_needed_flags_entry)); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ f_tally_alloc(iek_per_instantiation_needed_flags_entry); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pinfep->next = NULL; memzero((char *)pinfep->bytes, sizeof(pinfep->bytes)); @@ -1574,7 +1588,9 @@ otherwise, allocate it in the current file-scope memory region. scp, sizeof(a_class_list_entry)); #if DEBUG +/* GCOVR_EXCL_START */ f_tally_alloc(iek_class_list_entry); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ clep->next = NULL; clep->class_type = NULL; @@ -1685,7 +1701,9 @@ base_type, because base_type will point to the entry. &base_type->source_corresp, sizeof(a_based_type_list_member)); #if DEBUG +/* GCOVR_EXCL_START */ f_tally_alloc(iek_based_type_list_member); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ btlmp->next = NULL; btlmp->based_type = NULL; @@ -3251,7 +3269,9 @@ Allocate space for an asm function body and return a pointer to it. */ { #if DEBUG +/* GCOVR_EXCL_START */ asm_function_body_space_allocated += (unsigned long)len; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return (char *)alloc_cil(len); } /* alloc_asm_function_body */ @@ -3779,6 +3799,7 @@ Allocate and initialize an expression node. } else { ptr = alloc_il_of_type(an_expr_node); #if DEBUG +/* GCOVR_EXCL_START */ num_fs_expr_nodes_allocated += 1; { /* Increment num_rescan_fs_expr_nodes_allocated if we're in an expression rescan context (this is approximate). */ @@ -3786,6 +3807,7 @@ Allocate and initialize an expression node. extern void count_rescan_fs_expr_nodes(unsigned long*); count_rescan_fs_expr_nodes(&num_rescan_fs_expr_nodes_allocated); } +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } else { @@ -4403,9 +4425,11 @@ pointer to it. break; #endif /* ADD_CHECKING_PRAGMAS_FOR_INTERNAL_TESTING */ #if DEBUG +/* GCOVR_EXCL_START */ case pk_db_opt: case pk_db_name: break; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ case pk_push_macro: case pk_pop_macro: @@ -5294,10 +5318,12 @@ a pointer to it. snlep->next = NULL; snlep->source_file = NULL; #if DEBUG +/* GCOVR_EXCL_START */ #if EXPENSIVE_CHECKING snlep->is_marked_for_recycle = FALSE; #endif /* EXPENSIVE_CHECKING */ f_tally_alloc(iek_seq_number_lookup_entry); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return snlep; } /* alloc_seq_number_lookup_entry */ @@ -5784,6 +5810,7 @@ Allocate an entry for a_scoped_expression in the file scope memory region. } /* alloc_scoped_expression */ #if DEBUG +/* GCOVR_EXCL_START */ unsigned long show_il_alloc_space_used(unsigned long grand_total) /* @@ -5845,6 +5872,7 @@ Display and return the amount of space used for various IL tables. return grand_total; } /* show_il_alloc_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if CHECKING && defined(offsetof) @@ -6023,6 +6051,7 @@ in il_alloc_init.) pch_saved_var_array_elem(avail_constant_list_entries), #endif /* NEED_NAME_MANGLING */ #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(string_literal_text_space_allocated), pch_saved_var_array_elem(num_il_entry_prefixes_allocated), pch_saved_var_array_elem(num_fs_expr_nodes_allocated), @@ -6035,6 +6064,7 @@ in il_alloc_init.) pch_saved_var_array_elem(asm_function_body_space_allocated), #endif /* ASM_SUPPORT_NEEDED */ pch_array_saved_var_array_elem(il_allocation_counter), +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pch_saved_var_array_terminating_elem() }; @@ -6118,6 +6148,7 @@ initializations that are done for each compilation. /* Static variables. */ available_local_constants = NULL; #if DEBUG +/* GCOVR_EXCL_START */ string_literal_text_space_allocated = 0; num_il_entry_prefixes_allocated = 0; num_fs_expr_nodes_allocated = 0; @@ -6132,6 +6163,7 @@ initializations that are done for each compilation. for (unsigned iek = (unsigned)iek_none; iek < (unsigned)iek_last; ++iek) { il_allocation_counter[iek] = 0; } /* for */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if CHECKING local_constants_in_use = 0; diff --git a/src/il_alloc.h b/src/il_alloc.h index 58ddb4dba3..5ffd070313 100644 --- a/src/il_alloc.h +++ b/src/il_alloc.h @@ -444,7 +444,9 @@ extern a_module_import_decl_ptr alloc_module_import_decl(void); extern a_scoped_expression_ptr alloc_scoped_expression(void); #if DEBUG +/* GCOVR_EXCL_START */ unsigned long show_il_alloc_space_used(unsigned long grand_total); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ extern void il_alloc_one_time_init(void); diff --git a/src/il_def.h b/src/il_def.h index 012805beb7..1a1e993452 100644 --- a/src/il_def.h +++ b/src/il_def.h @@ -4573,6 +4573,7 @@ enum a_character_kind : a_byte { #endif /* NUM_BITS_FOR_CHARACTER_KIND < 3 */ #if DEBUG +/* GCOVR_EXCL_START */ /* Table of names corresponding to special function kinds, for debug purposes. */ @@ -4599,6 +4600,7 @@ EXTERN_CONSTINIT_ARRAY(a_const_char*, db_special_function_kinds, sfk_last + 1) } #endif /* VAR_INITIALIZERS */ EXTERN_CONSTINIT_ARRAY_END(db_special_function_kinds) +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -6750,8 +6752,10 @@ enum a_pragma_kind : a_byte { pk_checking_pragma, #endif /* ADD_CHECKING_PRAGMAS_FOR_INTERNAL_TESTING */ #if DEBUG +/* GCOVR_EXCL_START */ pk_db_opt, /* Used to specify a debugging option string. */ pk_db_name, /* Used to specify a debug entity name. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if NEED_IL_DISPLAY pk_il_display, /* To display the IL of an IL entity. */ @@ -6860,8 +6864,10 @@ EXTERN_CONSTINIT_ARRAY(a_const_char*, pragma_ids, pk_last + 1) /* pk_checking_pragma */ "checking_pragma", #endif /* ADD_CHECKING_PRAGMAS_FOR_INTERNAL_TESTING */ #if DEBUG +/* GCOVR_EXCL_START */ /* pk_db_opt */ "db_opt", /* pk_db_name */ "db_name", +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if NEED_IL_DISPLAY /* pk_il_display */ "il_display", @@ -10996,6 +11002,7 @@ typedef struct a_type { #if DEBUG +/* GCOVR_EXCL_START */ /* Table of storage class names, for debug purposes. */ @@ -11006,6 +11013,7 @@ EXTERN_CONSTINIT_ARRAY(a_const_char*, db_storage_class_names, sc_last + 1) } #endif /* VAR_INITIALIZERS */ EXTERN_CONSTINIT_ARRAY_END(db_storage_class_names) +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ enum an_init_kind : a_byte { @@ -19128,6 +19136,7 @@ EXTERN_THREAD an_il_header il_header; #endif /* NEAR_AND_FAR_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ /* Table of debug names for expression operators. */ EXTERN_CONSTINIT_ARRAY(a_const_char*, db_operator_names, eok_last + 1) #if VAR_INITIALIZERS @@ -19186,6 +19195,7 @@ EXTERN_CONSTINIT_ARRAY(a_const_char*, db_operator_names, eok_last + 1) } #endif /* VAR_INITIALIZERS */ EXTERN_CONSTINIT_ARRAY_END(db_operator_names) +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* diff --git a/src/il_display.c b/src/il_display.c index 9145ed239d..1915ee47d4 100644 --- a/src/il_display.c +++ b/src/il_display.c @@ -8586,7 +8586,9 @@ Set up for use of the il_to_str routines. octl.output_str = put_str_to_display; octl.gen_pcc_code = il_header.pcc_compatibility_mode; #if DEBUG +/* GCOVR_EXCL_START */ octl.debug_output = TRUE; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* init_for_il_to_str_output */ @@ -8788,13 +8790,17 @@ the IL associated with the entity that was bound to the pragma. init_front_end_f_display(); if (sym_ptr != NULL) { #if DEBUG +/* GCOVR_EXCL_START */ db_sym(sym_ptr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ entry_ptr = il_entry_for_symbol_null_okay(sym_ptr, &kind); } /* if */ if (stmt_ptr != NULL) { #if DEBUG +/* GCOVR_EXCL_START */ db_statement(stmt_ptr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ entry_ptr = (char*)stmt_ptr; kind = (an_il_entry_kind)iek_statement; @@ -8887,9 +8893,11 @@ where file.cil specifies the IL file. Output is to stdout. int optind = 1; #if DEBUG +/* GCOVR_EXCL_START */ /* Initialize the file variable used for debug output. This should be done before anything else that could potentially produce debug output. */ f_debug = stderr; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Initialize the components of the front end needed by standalone utility programs; further initialization is done after the il_header @@ -8904,12 +8912,14 @@ where file.cil specifies the IL file. Output is to stdout. /* Scan options. There's a limited set, so we don't use getopt. */ switch (argv[optind][1]) { #if DEBUG +/* GCOVR_EXCL_START */ case 'd': /* Scan debug argument */ if (proc_debug_option(argv[optind]+2)) { command_line_error(ec_cl_error_in_debug_option_argument); } /* if */ break; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ default: str_command_line_error(ec_cl_invalid_option, argv[optind]); diff --git a/src/il_read.c b/src/il_read.c index e405792ac5..6dce5147fe 100644 --- a/src/il_read.c +++ b/src/il_read.c @@ -338,9 +338,11 @@ necessary to make it directly accessible in memory. db_enter(2, "read_memory_region"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 2) { fprintf(f_debug, "Reading IL memory region %ld\n", (long)region_number); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if CHECKING if (region_number <= 0 || @@ -453,10 +455,12 @@ necessary to make it directly accessible in memory. /* Read the entry number. */ fread_with_check((char *)&encoded_number, sizeof(encoded_number)); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Read IL entry from file: kind = %u, number = %lu\n", (unsigned int)byte_entry_kind, (unsigned long)encoded_number); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if CHECKING if (byte_entry_kind == 0 || @@ -489,10 +493,12 @@ necessary to make it directly accessible in memory. if (is_string_entry) { fread_with_check((char *)&entry_length, sizeof(entry_length)); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Read IL entry from file: length = %lu\n", (unsigned long)entry_length); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if CHECKING { sizeof_t gross_entry_size; @@ -508,6 +514,7 @@ necessary to make it directly accessible in memory. count_of_entries_read[byte_entry_kind] += (an_il_entry_number)gross_entry_size; #if DEBUG +/* GCOVR_EXCL_START */ { sizeof_t count, idx; /* Record the space for the string entry as having been read. Also mark the space for the prefix (preceding the entry) and @@ -517,6 +524,7 @@ necessary to make it directly accessible in memory. set_entry_read_array(byte_entry_kind, idx); } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } #endif /* CHECKING */ @@ -527,8 +535,10 @@ necessary to make it directly accessible in memory. /* Count the entries read to see if we get all of them. */ count_of_entries_read[byte_entry_kind]++; #if DEBUG +/* GCOVR_EXCL_START */ /* Mark this entry as having been read. */ set_entry_read_array(byte_entry_kind, trimmed_entry_number); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* CHECKING */ /* If reading the file scope, read in the orphaned IL entry pointer @@ -570,6 +580,7 @@ necessary to make it directly accessible in memory. entry_count_array_ptr[byte_entry_kind]) { /* Not all expected entries were read. */ #if DEBUG +/* GCOVR_EXCL_START */ sizeof_t entry_count, idx; if (!errors) { @@ -612,6 +623,7 @@ necessary to make it directly accessible in memory. } /* if */ } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ errors = TRUE; } /* if */ @@ -646,10 +658,12 @@ necessary to make it directly accessible in memory. /* Loop for each block of the memory region. */ first_block = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "read_memory_region: at top of block read loop\n"); fprintf(f_debug, "total_bytes = %lu\n", (unsigned long)total_bytes); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ do { a_mem_block_header old_block_header; @@ -660,6 +674,7 @@ necessary to make it directly accessible in memory. /* Read a block. Start by reading the header. */ fread_with_check((char *)&old_block_header, sizeof(old_block_header)); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "start_of_block = %p\n", old_block_header.start_of_block); @@ -668,6 +683,7 @@ necessary to make it directly accessible in memory. fprintf(f_debug, "after_end_of_block = %p\n", old_block_header.after_end_of_block); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ total_bytes -= sizeof(old_block_header); block_size = old_block_header.after_end_of_block - @@ -675,11 +691,13 @@ necessary to make it directly accessible in memory. block_used = old_block_header.next_avail_in_block - old_block_header.start_of_block; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "block_used = %lu\n", (unsigned long)block_used); fprintf(f_debug, "block_size = %lu\n", (unsigned long)block_size); fprintf(f_debug, "total_bytes = %lu\n", (unsigned long)total_bytes); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if CHECKING /* Do some sanity checking. */ @@ -726,6 +744,7 @@ necessary to make it directly accessible in memory. } /* if */ } while (total_bytes > 0); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 2) { fprintf(f_debug, "at end of block read loop\n"); } /* if */ @@ -746,6 +765,7 @@ necessary to make it directly accessible in memory. fprintf(f_debug, "Blocks at same/different addresses: %lu/%lu\n", num_same, num_different); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!any_blocks_at_different_addresses && !reading_file_scope_il) { /* When reading a function scope memory region, the remapping has @@ -757,9 +777,11 @@ necessary to make it directly accessible in memory. if (fsbrep->old_start_addr != fsbrep->new_start_addr) { any_blocks_at_different_addresses = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 2) { fprintf(f_debug, "Will have to remap because fs region moved\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ break; } /* if */ diff --git a/src/il_to_str.c b/src/il_to_str.c index fa76388551..89561f9da7 100644 --- a/src/il_to_str.c +++ b/src/il_to_str.c @@ -139,7 +139,9 @@ Clear an output control block to default values. octl->for_diagnostics = FALSE; octl->reflection_display_form = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ octl->debug_output = FALSE; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ octl->force_qualified_name = FALSE; octl->gen_vla_array_as_asterisk_bound_array = FALSE; @@ -171,7 +173,9 @@ Clear an output control block to default values. Macro that is TRUE if debug output is being generated. */ #if DEBUG +/* GCOVR_EXCL_START */ #define generating_debug_output(octl) ((octl)->debug_output) +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ #define generating_debug_output(octl) (FALSE) /*lint --e(506)*/ #endif /* DEBUG */ @@ -239,6 +243,7 @@ Output an unsigned number as indicated by octl. } /* form_unsigned_num */ #if DEBUG +/* GCOVR_EXCL_START */ static void form_unsigned_hex(unsigned long num, an_il_to_str_output_control_block_ptr octl) @@ -251,6 +256,7 @@ Output an unsigned number in hexadecimal form, as indicated by octl. octl->output_str(num_buff.as_temp_characters(), octl); } /* form_unsigned_hex */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static void form_attribute_arguments( @@ -1009,10 +1015,12 @@ The output includes template arguments on template classes. octl->output_str("<", octl); octl->output_str(error_text(ec_unnamed), octl); #if DEBUG +/* GCOVR_EXCL_START */ if (octl->debug_output) { octl->output_str("@", octl); form_unsigned_hex(possible_lossy_cast_from_pointer(scp), octl); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ octl->output_str(">", octl); } /* if */ @@ -1055,8 +1063,10 @@ The output includes template arguments on template classes. tap = var_ptr->template_info->template_arg_list; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ } else if (octl->debug_output && entry_kind == iek_routine) { tap = ((a_routine_ptr)scp)->template_arg_list; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ if (tap != NULL) { @@ -1117,9 +1127,11 @@ octl. Called only for C++. */ /* Avoid abort on error case where parent has no supplement, so debug output will still come out okay. */ #if DEBUG +/* GCOVR_EXCL_START */ if (octl->debug_output) { octl->output_str("", octl); } else +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ { unexpected_condition_str("form_class_qualifier: missing supplement"); @@ -1314,10 +1326,12 @@ Output a string that describes the tag kind for the indicated type, i.e., case tk_union: str = "union"; break; default: #if DEBUG +/* GCOVR_EXCL_START */ if (octl->debug_output) { str = "**BAD-TAG-KIND**"; break; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str("form_tag_kind: bad type kind"); } /* switch */ @@ -1585,7 +1599,9 @@ way described by octl. #if CHECKING if (*str == '*' #if DEBUG +/* GCOVR_EXCL_START */ && !octl->debug_output +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ) { internal_error("form_int_type_name: bad integer kind"); @@ -1724,7 +1740,9 @@ way described by octl. #if CHECKING if (*str == '*' #if DEBUG +/* GCOVR_EXCL_START */ && !octl->debug_output +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ) { internal_error("form_float_kind_name: bad float kind"); @@ -2735,6 +2753,7 @@ by octl. form_name(scp, (an_il_entry_kind)scp_kind, octl); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (octl->debug_output) { if (type->variant.template_param.kind == (a_template_param_type_kind)tptk_param) { @@ -2749,6 +2768,7 @@ by octl. octl->output_str(buf.as_temp_characters(), octl); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } @@ -2854,10 +2874,12 @@ by octl. break; default: #if DEBUG +/* GCOVR_EXCL_START */ if (octl->debug_output) { octl->output_str("**BAD-TYPE-KIND**", octl); break; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str("form_type_specifier: bad type kind"); } /* switch */ @@ -3215,10 +3237,12 @@ if FTO_SUPPRESS_SPECIFIERS is TRUE, suppress generation of the type specifiers if (type == NULL) { /* NULL type pointer. */ #if DEBUG +/* GCOVR_EXCL_START */ if (octl->debug_output) { octl->output_str("**NULL-TYPE-POINTER**", octl); goto end_of_routine; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_assertion_str(!octl->gen_compilable_code, "form_type_first_part: NULL type"); @@ -5486,7 +5510,9 @@ precedence confusion. Do the output in the way described by octl. desired_type = NULL; } else if ( #if DEBUG +/* GCOVR_EXCL_START */ !octl->debug_output && +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ !is_for_c_gen_be(octl) && constant->implicit_cast && @@ -6288,6 +6314,7 @@ on every expression. form_expression(operand, octl); octl->output_str(")", octl); #if DEBUG +/* GCOVR_EXCL_START */ } else if (octl->debug_output) { a_const_char *op_str = db_operator_names[expr->variant.operation.kind]; @@ -6367,6 +6394,7 @@ on every expression. octl->output_str(")", octl); } /* if */ octl->output_str(")", octl); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else if (op == (an_expr_operator_kind)eok_array_to_pointer || op == (an_expr_operator_kind)eok_lvalue_adjust || @@ -6416,6 +6444,7 @@ on every expression. break; case enk_temp_init: #if DEBUG +/* GCOVR_EXCL_START */ if (octl->debug_output) { octl->output_str("temp(", octl); form_type(expr->type, octl); @@ -6423,6 +6452,7 @@ on every expression. form_dynamic_init(expr->variant.init.dynamic_init, octl); octl->output_str(")", octl); } else +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Do not insert code here */ { a_dynamic_init_ptr dip = expr->variant.init.dynamic_init; @@ -6445,6 +6475,7 @@ on every expression. break; case enk_builtin_operation: #if DEBUG +/* GCOVR_EXCL_START */ if (octl->debug_output) { an_expr_node_ptr operand = expr->variant.builtin_operation.operands; a_const_char *op_str = builtin_operation_names[ @@ -6458,6 +6489,7 @@ on every expression. } /* while */ octl->output_str(")", octl); } else +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Do not insert code here. */ { @@ -6497,6 +6529,7 @@ on every expression. break; case enk_c11_generic: #if DEBUG +/* GCOVR_EXCL_START */ if (octl->debug_output) { an_expr_node_ptr operand = expr->variant.c11_generic.operands; octl->output_str("_Generic", octl); @@ -6515,6 +6548,7 @@ on every expression. } /* while */ octl->output_str(")", octl); } else +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Do not insert code here. */ { @@ -6550,6 +6584,7 @@ on every expression. } /* form_expression */ #if DEBUG +/* GCOVR_EXCL_START */ void db_abbr_expr(an_expr_node_ptr expr, an_il_to_str_output_control_block_ptr octl) @@ -6561,6 +6596,7 @@ debug output routines. form_expression(expr, octl); } /* db_abbr_expr */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -6793,9 +6829,11 @@ precedence confusion. Do the output in the way described by octl. if (kind != (a_constant_repr_kind)ck_init_repeat && kind != (a_constant_repr_kind)ck_designator) { #if DEBUG +/* GCOVR_EXCL_START */ if (octl->debug_output) { octl->output_str("**NULL-CONSTANT-TYPE**", octl); } else +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Do not insert code here. This is the else of an "if". */ { @@ -6864,7 +6902,9 @@ precedence confusion. Do the output in the way described by octl. } else if (constant->implicit_cast) { if ( #if DEBUG +/* GCOVR_EXCL_START */ (octl->debug_output && !is_nullptr_type(con_type)) || +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ is_for_c_gen_be(octl)) { #if GCC_BUILTIN_VARARGS @@ -7000,7 +7040,9 @@ precedence confusion. Do the output in the way described by octl. constant->source_corresp.is_class_member = orig_class_member; } else if (is_enum && il_header.source_language == sl_Cplusplus && #if DEBUG +/* GCOVR_EXCL_START */ !octl->debug_output && +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ is_enum_constant_equivalent(constant, &equiv_constant)) { /* The equivalent of an enum constant (an enum constant used in @@ -7375,10 +7417,12 @@ precedence confusion. Do the output in the way described by octl. for (; sub_con != NULL; sub_con = sub_con->next) { if (sub_con->implicit_aggr_element && !is_for_c_gen_be(octl)) { #if DEBUG +/* GCOVR_EXCL_START */ if (octl->debug_output) { /* Emit the constant (with an indication that it is implicit). */ octl->output_str(error_text(ec_implicit_element), octl); } else +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Do not insert code here. */ { @@ -7675,10 +7719,12 @@ precedence confusion. Do the output in the way described by octl. break; default: #if DEBUG +/* GCOVR_EXCL_START */ if (octl->debug_output) { octl->output_str("**BAD-CONSTANT-KIND**", octl); break; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str("form_constant: bad constant kind"); } /* switch */ @@ -8564,6 +8610,7 @@ is properly maintained. Do the output as indicated by octl. #if BACK_END_IS_C_GEN_BE || BACK_END_IS_CP_GEN_BE #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD uintptr_t unique_id_counter; @@ -8602,6 +8649,7 @@ pointer. return result; } /* generate_unique_id_for_temporary */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ a_temp_var_name_buffer form_temporary_name_for_back_end(void *ptr) @@ -8612,9 +8660,11 @@ Return a temporary name generated for the given IL pointer. uintptr_t unique_id; #if DEBUG +/* GCOVR_EXCL_START */ if (db_active) { unique_id = generate_unique_id_for_temporary(ptr); } else +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Do not add code here. */ { @@ -8633,9 +8683,11 @@ are initializations that must be redone for each generated file. */ { #if DEBUG +/* GCOVR_EXCL_START */ unique_id_counter = 0; ptr_to_unique_id = alloc_general_of_type(a_ptr_unique_id_map); construct(ptr_to_unique_id, /*mask_width=*/10u); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* il_to_str_back_end_file_init */ diff --git a/src/il_to_str.h b/src/il_to_str.h index 80f2ab82a8..54845e34d8 100644 --- a/src/il_to_str.h +++ b/src/il_to_str.h @@ -287,9 +287,11 @@ typedef struct an_il_to_str_output_control_block { entity and with the full signature of a function rather than just its name. */ #if DEBUG +/* GCOVR_EXCL_START */ a_byte_boolean debug_output; /* TRUE if the generated string is part of debug output. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ a_byte_boolean force_qualified_name; @@ -695,8 +697,10 @@ extern void il_to_str_back_end_file_init(); #endif /* BACK_END_IS_C_GEN_BE || BACK_END_IS_CP_GEN_BE */ #if DEBUG +/* GCOVR_EXCL_START */ void db_abbr_expr(an_expr_node_ptr expr, an_il_to_str_output_control_block_ptr octl); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ extern void il_to_str_one_time_init(void); diff --git a/src/il_walk.c b/src/il_walk.c index 12b733b2cd..b51286d867 100644 --- a/src/il_walk.c +++ b/src/il_walk.c @@ -184,6 +184,7 @@ they are referenced for purposes of tree walking. /* Ignore NULL pointers. */ if (entry_ptr != NULL) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { a_const_char *s; switch (entry_kind) { @@ -194,6 +195,7 @@ they are referenced for purposes of tree walking. } /* switch */ fprintf(f_debug, "Walking IL tree, string entry kind = %s\n", s); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Call the routine to process string entries only if there is one. */ if (string_entry_process_func != NULL) { @@ -639,6 +641,7 @@ definition of the routine is needed, and not just the declaration. "set_routine_definition_needed: generated ctor"); set_routine_definition_needed_flag(rout); #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("needed_flags", rout, iek_routine)) { #if ONE_INSTANTIATION_PER_OBJECT if (needed_flag_bit_number != 0) { @@ -653,6 +656,7 @@ definition of the routine is needed, and not just the declaration. db_name_full(&rout->source_corresp, iek_routine); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* If the definition is present, walk it. set_routine_defined and remark_routine_definition_needed take care of calling this again @@ -850,6 +854,7 @@ definition of the class is needed, and not just the declaration. /* Set the flag if it is not set already. */ set_class_definition_needed_flag(type); #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("needed_flags", type, iek_type)) { #if ONE_INSTANTIATION_PER_OBJECT if (needed_flag_bit_number != 0) { @@ -864,6 +869,7 @@ definition of the class is needed, and not just the declaration. db_abbreviated_type(type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ set_class_keep_definition_in_il(type); /* If the class is already marked as needed, redo the sweep for that, @@ -1017,6 +1023,7 @@ as needed. /* The flag is not set, so set it and keep walking. */ set_needed_flag(scp); #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("needed_flags", entry_ptr, entry_kind)) { if (entry_kind == iek_type || entry_kind == iek_variable || @@ -1051,6 +1058,7 @@ as needed. fprintf(f_debug, "\n"); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Determine whether the subtree of this entry should be walked. */ prune = !should_walk_subtree( @@ -1571,11 +1579,13 @@ declaration. /* Set the flag if it is not set already. */ rout->keep_definition_in_il = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("needed_flags", rout, iek_routine)) { fprintf(f_debug, "Setting keep_definition_in_il on rout "); db_name_full(&rout->source_corresp, iek_routine); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* If the definition is present, walk it. set_routine_defined takes care of calling this again later when the routine is defined @@ -1703,11 +1713,13 @@ limit recursion depth. /* Set the flag if it is not set already. */ type->variant.class_struct_union.keep_definition_in_il = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("needed_flags", type, iek_type)) { fprintf(f_debug, "Setting keep_definition_in_il on "); db_abbreviated_type(type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* If the class is already marked to be kept in the IL, redo the sweep for that, because before the keep_definition_in_il flag is set the @@ -1868,6 +1880,7 @@ to be kept. /* Set the flag. */ il_entry_prefix_of(entry_ptr).keep_in_il = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("needed_flags", entry_ptr, entry_kind)) { if (entry_kind == iek_type) { fprintf(f_debug, "Setting keep_in_il on type "); @@ -1890,6 +1903,7 @@ to be kept. fprintf(f_debug, "\n"); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* If this is an entry that might be redeclared or redefined later, do not walk its subtree now. */ @@ -1955,9 +1969,11 @@ only the entries marked as "needed" are marked to keep in the IL. file_scope_walk = TRUE; il_entry_prefix_of(entry_ptr).keep_in_il = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("needed_flags")) { fprintf(f_debug, "Beginning file scope keep_in_il walk\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ @@ -2008,9 +2024,11 @@ only the entries marked as "needed" are marked to keep in the IL. iek_macro_invocation_record_block); #endif /* MACRO_INVOCATION_TREE_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("needed_flags")) { fprintf(f_debug, "Ending file scope keep_in_il walk\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ diff --git a/src/il_write.c b/src/il_write.c index 9d73967dd7..f999428740 100644 --- a/src/il_write.c +++ b/src/il_write.c @@ -210,7 +210,9 @@ encoded form. that after all the function scopes have been written). */ if (epp->file_scope) { #if DEBUG +/* GCOVR_EXCL_START */ display_il_entry_kind_and_ptr(entry_ptr, entry_kind); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("assign_entry_number: file-scope num in func scope"); } /* if */ @@ -252,7 +254,9 @@ encoded form. #if CHECKING if (!epp->file_scope) { #if DEBUG +/* GCOVR_EXCL_START */ display_il_entry_kind_and_ptr(entry_ptr, entry_kind); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error( "assign_entry_number: non-file-scope ptr referenced from file scope"); @@ -348,7 +352,9 @@ corresponding encoded entry number, and return that number cast to "char *". write_entry. We can't handle them here because we don't have the length. */ #if DEBUG +/* GCOVR_EXCL_START */ display_il_entry_kind_and_ptr(entry_ptr, entry_kind); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("remap_ptr_to_entry_number: string entry"); } /* if */ @@ -659,7 +665,9 @@ its length. #if CHECKING if (!is_string_entry) { #if DEBUG +/* GCOVR_EXCL_START */ display_il_entry_kind_and_ptr(entry_ptr, entry_kind); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("write_entry: non-string entry already written"); } /* if */ @@ -667,12 +675,14 @@ its length. goto end_of_routine; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Writing IL entry to file: kind = %d, number = %lu, length = %lu\n", (int)entry_kind, (unsigned long)encoded_number, (unsigned long)entry_length); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* For non-string entries, the pointers must be remapped. Make a copy so the original pointers can be restored after the write. */ @@ -758,10 +768,12 @@ Write the indicated memory region to the file f_il_output. written. */ if (f_il_output != NULL) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 2) { fprintf(f_debug, "Writing out memory region %lu\n", (unsigned long)(unsigned)region_number); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if ALTERNATE_IL_FILE_FORMAT /* Using alternate IL file format. */ @@ -903,9 +915,11 @@ Write the indicated memory region to the file f_il_output. total_bytes += sizeof(a_mem_block_header) + block_used; } /* for */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "total_bytes = %lu\n", (unsigned long)total_bytes); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ hdr = mem_region_table[region_number]; /* Write the original address of the first block, the original address @@ -919,11 +933,13 @@ Write the indicated memory region to the file f_il_output. for (; hdr != NULL; hdr = hdr->next) { sizeof_t block_used = hdr->next_avail_in_block - hdr->start_of_block; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "writing %lu + %lu\n", (unsigned long)sizeof(a_mem_block_header), (unsigned long)block_used); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if ((fwrite((char *)hdr, sizeof(a_mem_block_header), 1, f_il_output) != 1) || diff --git a/src/inline.c b/src/inline.c index 7da03d15f8..4042100377 100644 --- a/src/inline.c +++ b/src/inline.c @@ -114,7 +114,9 @@ return. vrip = (a_variable_remapping_for_inlining_ptr) alloc_fe(sizeof(a_variable_remapping_for_inlining)); #if DEBUG +/* GCOVR_EXCL_START */ num_variable_remappings_for_inlining++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Keep the variable mappings in the order that the arguments are being @@ -177,6 +179,7 @@ the available list. } /* free_variable_remappings_for_inlining */ #if DEBUG +/* GCOVR_EXCL_START */ static void db_variable_remapping(a_variable_remapping_for_inlining_ptr vrip) /* @@ -207,6 +210,7 @@ Display the indicated variable remapping for debugging purposes. fprintf(f_debug, "\n"); } /* db_variable_remapping */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static void make_remapping_temporary( @@ -357,7 +361,9 @@ evaluated from left-to-right unless eval_right_to_left is TRUE. vrip, last_remap = NULL; a_routine_ptr routine = scope->variant.routine.ptr; #if DEBUG +/* GCOVR_EXCL_START */ a_boolean first = TRUE; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ a_boolean call_has_side_effects, arg_list_has_side_effects; @@ -527,6 +533,7 @@ evaluated from left-to-right unless eval_right_to_left is TRUE. the argument value. See finish_variable_remapping_for_inlining. */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { if (first) { fprintf(f_debug, "Parameter remappings established:\n"); @@ -534,12 +541,15 @@ evaluated from left-to-right unless eval_right_to_left is TRUE. } /* if */ db_variable_remapping(vrip); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* for */ /* Process the local variables. */ #if DEBUG +/* GCOVR_EXCL_START */ first = TRUE; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ for (var = scope->nonstatic_variables; var != NULL; @@ -554,6 +564,7 @@ evaluated from left-to-right unless eval_right_to_left is TRUE. (a_boolean)var->is_temp_for_constructor_this_inlined_param, (a_boolean)var->is_temp_for_unmodified_inlined_param); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { if (first) { fprintf(f_debug, "Variable remappings established:\n"); @@ -561,6 +572,7 @@ evaluated from left-to-right unless eval_right_to_left is TRUE. } /* if */ db_variable_remapping(vrip); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* for */ @@ -1792,11 +1804,13 @@ detached from the IL (and should therefore no longer be used), FALSE otherwise. duration of the inlining to avoid problems with recursion. */ routine->inlinable = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Beginning inlining of call to "); db_name(&routine->source_corresp); fprintf(f_debug, ":\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ scope = scope_for_routine(routine); routine_scope_being_inlined = scope; @@ -1927,11 +1941,13 @@ detached from the IL (and should therefore no longer be used), FALSE otherwise. if (failed) issue_inlining_failure_diagnostic(routine, is_too_large); routine_scope_being_inlined = NULL; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "End of inlining of call to "); db_name(&routine->source_corresp); fprintf(f_debug, "%s\n", failed ? " (failed)" : ""); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -2059,7 +2075,9 @@ are handled in inline_init.) STATIC_THREAD a_pch_saved_variable saved_vars[] = { pch_saved_var_array_elem(avail_variable_remappings_for_inlining), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_variable_remappings_for_inlining), +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pch_saved_var_array_terminating_elem() }; @@ -2077,7 +2095,9 @@ for each compilation. /* Variables in inline.h: */ avail_variable_remappings_for_inlining = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_variable_remappings_for_inlining = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Static variables in inline.c: */ variable_remappings_for_inlining = NULL; diff --git a/src/inline.h b/src/inline.h index a3a00a638b..5434d9da97 100644 --- a/src/inline.h +++ b/src/inline.h @@ -107,11 +107,13 @@ EXTERN_THREAD a_variable_remapping_for_inlining_ptr and are available for reuse. */ #if DEBUG +/* GCOVR_EXCL_START */ /* Count of entries allocated, for debugging purposes. */ EXTERN_THREAD unsigned long num_variable_remappings_for_inlining; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ diff --git a/src/interpret.c b/src/interpret.c index 1ebcfc1719..aaa0c03b29 100644 --- a/src/interpret.c +++ b/src/interpret.c @@ -2249,6 +2249,7 @@ Release the storage stack pointed to by sss for reuse. } /* release_constexpr_stack */ #if DEBUG +/* GCOVR_EXCL_START */ void db_live_set(void *interpreter_state) /* @@ -2268,6 +2269,7 @@ Output the current live set record in ips. (void)fprintf(f_debug, "\n"); } /* db_live_set */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* @@ -2453,6 +2455,7 @@ storage. get_mapped_ptr(&(ips)->map, iptr, sptr) #if DEBUG +/* GCOVR_EXCL_START */ void db_data_map(void *map_address) /* @@ -2476,6 +2479,7 @@ Output some information about a data map's contents } /* for */ } /* db_data_map */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static void expand_ptr_map(a_data_map *map) @@ -2540,7 +2544,9 @@ from a map. */ { #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "\nMap activity for %p: %s\n", traced_iptr, msg); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* interpreter_map_intercept */ @@ -3820,7 +3826,9 @@ type kinds. If the number of bytes is too large, interpretation fails, and if (result == 0) { /* This class type does not have an interpreter layout yet. */ #if DEBUG +/* GCOVR_EXCL_START */ check_assertion(ips != NULL); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (tp->variant.class_struct_union.is_nonreal_class && !tp->variant.class_struct_union.is_empty_class) { @@ -3853,7 +3861,9 @@ type kinds. If the number of bytes is too large, interpretation fails, and } /* if */ } else if (result > MAX_CONSTEXPR_TYPE_SIZE) { #if DEBUG +/* GCOVR_EXCL_START */ check_assertion(ips != NULL); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (result == CONSTEXPR_TYPE_SIZE_INPUT_ERROR) { ips->input_error = TRUE; @@ -3869,7 +3879,9 @@ type kinds. If the number of bytes is too large, interpretation fails, and get_mapped_byte_count(&persistent_map, tp, result); if (result == 0) { #if DEBUG +/* GCOVR_EXCL_START */ check_assertion(ips != NULL); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (tp->variant.class_struct_union.is_nonreal_class) { result = value_bytes_for_type_failure(ec_constexpr_type_invalid, @@ -3882,7 +3894,9 @@ type kinds. If the number of bytes is too large, interpretation fails, and } /* if */ } else if (result > MAX_CONSTEXPR_TYPE_SIZE) { #if DEBUG +/* GCOVR_EXCL_START */ check_assertion(ips != NULL); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (result == CONSTEXPR_TYPE_SIZE_INPUT_ERROR) { ips->input_error = TRUE; @@ -3910,7 +3924,9 @@ type kinds. If the number of bytes is too large, interpretation fails, and } else if (n_elems > MAX_CONSTEXPR_TYPE_SIZE/result || n_elems > MAX_ARRAY_LENGTH) { #if DEBUG +/* GCOVR_EXCL_START */ check_assertion(ips != NULL); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ result = value_bytes_for_type_failure(ec_constexpr_type_too_large, ips, tp, p_result); @@ -3941,7 +3957,9 @@ type kinds. If the number of bytes is too large, interpretation fails, and break; case tk_error: #if DEBUG +/* GCOVR_EXCL_START */ check_assertion(ips != NULL); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ips->input_error = TRUE; FALLTHROUGH @@ -4376,7 +4394,9 @@ that type. #if DEBUG +/* GCOVR_EXCL_START */ #define debug_scramble(ptr, n_bytes) (void)memset(ptr, 0xdb, n_bytes) +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ #define debug_scramble(ptr, n_bytes) /*nothing*/ #endif /* DEBUG */ @@ -5245,6 +5265,7 @@ associated with the objects. } /* eq_subobjects */ #if DEBUG +/* GCOVR_EXCL_START */ uintptr_t db_hash_ptr(void *ptr) /* @@ -5618,6 +5639,7 @@ Return a pointer to the stack storage associated with the given pointer. return bytes; } /* db_stack_storage */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* @@ -7826,6 +7848,7 @@ be removed. } /* do_constexpr_alloc_variable */ #if DEBUG +/* GCOVR_EXCL_START */ void db_var_chain(an_interpreter_state *ips, a_variable_ptr vp) @@ -7850,6 +7873,7 @@ activations of the given variable. } /* if */ } /* db_var_chain */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static void do_constexpr_unmap_variable(an_interpreter_state *ips, @@ -34729,6 +34753,7 @@ std::is_constant_evaluated.) } /* register_constexpr_intrinsic */ #if DEBUG +/* GCOVR_EXCL_START */ unsigned long db_show_interpret_fe_space_used(unsigned long grand_total) /* @@ -34769,6 +34794,7 @@ Display memory use for entities in front end memory in this file (interpret.c). return grand_total; } /* db_show_interpret_fe_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void interpret_trans_unit_init(void) diff --git a/src/interpret.h b/src/interpret.h index 57f0aa5755..7b4aa5346e 100644 --- a/src/interpret.h +++ b/src/interpret.h @@ -399,6 +399,7 @@ a_boolean constexpr_diag_tag_is_valid(a_const_char *tag, #if DEBUG +/* GCOVR_EXCL_START */ uintptr_t db_hash_ptr(void *ptr); a_host_large_integer db_int_val(a_byte *val_bytes); @@ -420,6 +421,7 @@ unsigned long db_show_interpret_fe_space_used(unsigned long grand_total); unsigned long db_object_alloc_num(a_byte *ptr); #endif /* TRACK_INTERPRETER_ALLOCATIONS */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void clean_up_interpreter(void); diff --git a/src/layout.c b/src/layout.c index 638258e04d..2ea5e2fc77 100644 --- a/src/layout.c +++ b/src/layout.c @@ -634,6 +634,7 @@ curr_max_member_alignment. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "curr_max_member_alignment = %d, stack = ", (int)curr_max_member_alignment); @@ -645,6 +646,7 @@ curr_max_member_alignment. pack_alignment_stack->alignment); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if BACK_END_IS_CP_GEN_BE if (ppp->il_pragma_entry != NULL) { @@ -3020,12 +3022,14 @@ the layout of lob->class_type (which is also proximate_derivation->type). ref_bcp = direct_base_classes_of(proximate_derivation->type); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { if (ref_bcp != NULL) { fputs("setting offsets for base classes of:\n ", f_debug); db_base_class(proximate_derivation, /*show_offset=*/TRUE); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Loop through the reference base classes, the direct base classes of the proximate_derivation base class. */ @@ -3063,12 +3067,14 @@ the layout of lob->class_type (which is also proximate_derivation->type). bcp->offset_is_set = TRUE; #endif /* IA64_ABI */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("reference base class ", f_debug); db_base_class(ref_bcp, /*show_offset=*/TRUE); fputs("new offset for ", f_debug); db_base_class(bcp, /*show_offset=*/TRUE); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if IA64_ABI } else if (proximate_derivation->primary_base_class == bcp) { @@ -3086,12 +3092,14 @@ the layout of lob->class_type (which is also proximate_derivation->type). the offset. */ bcp->offset = proximate_derivation->offset + ref_bcp->offset; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("reference base class ", f_debug); db_base_class(ref_bcp, /*show_offset=*/TRUE); fputs("new offset for ", f_debug); db_base_class(bcp, /*show_offset=*/TRUE); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ #endif /* CFRONT_OBJECT_CODE_COMPATIBILITY */ @@ -3125,12 +3133,14 @@ the layout of lob->class_type (which is also proximate_derivation->type). the offset. */ bcp->offset = proximate_derivation->offset + ref_bcp->offset; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("reference base class ", f_debug); db_base_class(ref_bcp, /*show_offset=*/TRUE); fputs("new offset for ", f_debug); db_base_class(bcp, /*show_offset=*/TRUE); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ #endif /* CFRONT_OBJECT_CODE_COMPATIBILITY */ @@ -3191,10 +3201,12 @@ Lay out the nonvirtual direct base class bcp. } /* if */ bcp->offset = set_offset_and_alignment(lob, size, alignment, bcp); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("updated offset for ", f_debug); db_base_class(bcp, /*show_offset=*/TRUE); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ #if IA64_ABI @@ -3798,10 +3810,12 @@ bcp. bcp->pointer_offset = set_offset_and_alignment(lob, size, alignment, (a_base_class_ptr)NULL); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("updated pointer offset for ", f_debug); db_base_class(bcp, /*show_offset=*/TRUE); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* pointer_offset_for_virtual_base_class */ @@ -4239,10 +4253,12 @@ designated). bcp->type->alignment, (a_base_class_ptr)NULL); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("updated offset for ", f_debug); db_base_class(bcp, /*show_offset=*/TRUE); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ fixup_embedded_virtual_base_classes(bcp, lob->class_type); } /* if */ @@ -4468,10 +4484,12 @@ Set bcp->offset. The base class bcp must be a virtual base. set_base_class_offsets(lob, bcp); #endif /* IA64_ABI */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("updated offset for ", f_debug); db_base_class(bcp, /*show_offset=*/TRUE); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* set_virtual_base_class_offset */ @@ -4642,12 +4660,14 @@ some current state about the layout of lob->class_type. db_enter(4, "set_offsets_for_indirect_base_classes"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { if (bcp != NULL) { fputs("before setting offsets: ", f_debug); db_base_class_list(class_type); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Loop through the list of base classes, direct and indirect, that are defined for the class, but ignore all but the direct base classes. The @@ -4681,9 +4701,11 @@ lob->class_type. if (base_class->offset == 0) { /* Offset has not yet been set. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { db_base_class(base_class, /*show_offset=*/TRUE); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ data_section_bcp = base_class->data_section_base_class; if (data_section_bcp != NULL) { @@ -5097,11 +5119,13 @@ for handling virtual bases and functions. goto set_size_for_complete_object; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("dump_layout", class_type, iek_type)) { fprintf(f_debug, "Computing layout for "); db_abbreviated_type(class_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (class_type->alignment_set_explicitly) { /* Save the desired alignment and compute the alignment normally. @@ -5352,6 +5376,7 @@ for handling virtual bases and functions. } /* if */ #endif /* GNU_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { if (C_dialect == C_dialect_cplusplus) db_base_class_list(class_type); } /* if */ @@ -5359,6 +5384,7 @@ for handling virtual bases and functions. db_type(class_type); fputs("\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* do_class_layout */ diff --git a/src/lexical.c b/src/lexical.c index a77bfb4234..1be7b9d8bf 100644 --- a/src/lexical.c +++ b/src/lexical.c @@ -78,7 +78,9 @@ Allocate a block of address space to token control blocks. avail_token_ctrl_blocks->push_back(elem + (i - 1)); } /* for */ #if DEBUG +/* GCOVR_EXCL_START */ num_shared_token_states_allocated += token_ctrl_block_batch_size; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* FE_allocator::reserve_block */ @@ -2849,6 +2851,7 @@ and empty the list. } /* report_char_overflows */ #if DEBUG +/* GCOVR_EXCL_START */ /* Counts of tables allocated, to track total use of memory. */ @@ -2902,6 +2905,7 @@ is non-zero. Ensures that a '\n' is always the last character written. #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -3031,7 +3035,9 @@ Allocate a reusable cache entry. Reuse a freed entry if possible. rsep = (a_reusable_cache_entry_ptr) alloc_fe(sizeof(a_reusable_cache_entry)); #if DEBUG +/* GCOVR_EXCL_START */ num_reusable_cache_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ rsep->next = NULL; @@ -3058,7 +3064,9 @@ Allocate a cached constant entry. Reuse a freed entry if possible. /* Allocate a new entry. */ cp = (a_constant_ptr)alloc_fe(sizeof(a_constant)); #if DEBUG +/* GCOVR_EXCL_START */ num_cached_constants_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ return cp; @@ -3118,8 +3126,10 @@ memory. /* Allocate the string, adding space for the terminator. */ new_start = (char *)alloc_fe(length+1); #if DEBUG +/* GCOVR_EXCL_START */ /* Track the amount of space used for pp token strings. */ cached_pp_token_string_space += (unsigned long)(length+1); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ new_end = new_start + length - 1; strncpy(new_start, start_of_curr_token, size_t_arg(length)); @@ -4474,6 +4484,7 @@ that the current token may be discarded). { db_enter(4, "rescan_cached_tokens"); #if DEBUG +/* GCOVR_EXCL_START */ /* This cache was marked as reusable but is now being destructively rescanned. Update the count of reusable cached tokens. */ if (cache->is_reusable) { @@ -4481,6 +4492,7 @@ that the current token may be discarded). later in this routine) won't be considered reusable. */ cache->is_reusable = FALSE; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!cache->is_empty()) { /* Add the current token to the cache, so that it is not lost. */ @@ -5016,7 +5028,9 @@ original source line because of trigraphs and line splices. /* Allocate a new entry. */ olmp = (an_orig_line_modif_ptr)alloc_fe(sizeof(an_orig_line_modif)); #if DEBUG +/* GCOVR_EXCL_START */ num_orig_line_modifs_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Set the fixed fields. */ @@ -5168,7 +5182,9 @@ headp and tailp, and set its line_loc and macro_sym pointers as specified. /* Allocate a new record. */ crp = (a_concatenation_record_ptr)alloc_fe(sizeof(a_concatenation_record)); #if DEBUG +/* GCOVR_EXCL_START */ ++num_concatenation_records_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ if (*tailp != NULL) { @@ -5238,7 +5254,9 @@ optimize calls to nested_source_line_modif. a_source_line_modif_ptr tslmp, pslmp; #if DEBUG +/* GCOVR_EXCL_START */ num_lookups_in_source_line_modif_hash_table++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ for (pslmp = NULL, tslmp = source_line_modif_hash_table[hash]; ; @@ -5246,7 +5264,9 @@ optimize calls to nested_source_line_modif. check_assertion_str(tslmp != NULL, "rem_source_line_modif_from_hash_table: not found in hash table"); #if DEBUG +/* GCOVR_EXCL_START */ num_compares_in_source_line_modif_hash_table++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (tslmp == slmp) { /* Found the entry. Unlink it from the hash table. */ @@ -5303,7 +5323,9 @@ invocations. /* Allocate a new entry. */ slmp = (a_source_line_modif_ptr)alloc_fe(sizeof(a_source_line_modif)); #if DEBUG +/* GCOVR_EXCL_START */ num_source_line_modifs_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ slmp->next = source_line_modif_list; @@ -5553,7 +5575,9 @@ and return a pointer to it. a_source_line_modif_ptr slmp; #if DEBUG +/* GCOVR_EXCL_START */ num_lookups_in_source_line_modif_hash_table++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Find the location in the hash table. */ for (slmp = source_line_modif_hash_table[hash]; @@ -5562,7 +5586,9 @@ and return a pointer to it. check_assertion_str(slmp != NULL, "nested_source_line_modif: not found in hash table"); #if DEBUG +/* GCOVR_EXCL_START */ num_compares_in_source_line_modif_hash_table++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (slmp->line_loc == loc_in_line) break; } /* for */ @@ -5584,14 +5610,18 @@ location, FALSE otherwise. a_source_line_modif_ptr slmp; #if DEBUG +/* GCOVR_EXCL_START */ num_lookups_in_source_line_modif_hash_table++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Search the hash table for the specified location. */ for (slmp = source_line_modif_hash_table[hash]; slmp != NULL && slmp->line_loc != loc_in_line; slmp = slmp->next_in_hash_table) { #if DEBUG +/* GCOVR_EXCL_START */ num_compares_in_source_line_modif_hash_table++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ return slmp != NULL; @@ -6644,7 +6674,9 @@ a pointer. a_preinclude_file_ptr pfp; pfp = alloc_general_of_type(a_preinclude_file); #if DEBUG +/* GCOVR_EXCL_START */ num_preinclude_files_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pfp->next = NULL; pfp->file_name = NULL; @@ -6735,7 +6767,9 @@ a pointer. ifhp = (an_include_file_history_ptr) alloc_fe(sizeof(an_include_file_history)); #if DEBUG +/* GCOVR_EXCL_START */ num_include_file_histories_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ifhp->full_name = NULL; ifhp->suppress_subsequent_include = FALSE; @@ -7013,16 +7047,19 @@ entry is found or created, return the pointer in ifhp_ptr. result = suppress_subsequent_include(*ifhp_ptr); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ssiof")) { fprintf(f_debug, "suppress_subsequent_include_of_file: %s: %s\n", full_name, result ? "yes" : "no"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return result; } /* suppress_subsequent_include_of_file */ #if DEBUG +/* GCOVR_EXCL_START */ static void db_include_guard_info(void) /* Display the include guard information associated with the current input @@ -7069,6 +7106,7 @@ stack entry, for debugging purposes. } /* switch */ db_exit(); } /* db_include_guard_info */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -7294,11 +7332,13 @@ and this include was suppressed, FALSE otherwise. if (!suppress_include) (void)fclose(input_file); if (include_was_suppressed != NULL) *include_was_suppressed = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "open_file_and_push_input_stack: skipping guarded include file %s\n", file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* If generating a list of include files (-H option), put out the file name. */ @@ -7431,7 +7471,9 @@ return a pointer to it. isrp = alloc_general_of_type(an_include_search_result); #if DEBUG +/* GCOVR_EXCL_START */ num_include_search_results_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ clear_include_search_result(isrp); return isrp; @@ -7507,10 +7549,12 @@ is set to indicate whether or not the returned entry is a newly created one. /*create=*/TRUE); isrp = *isrp_in_table; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ssiof")) { fprintf(f_debug, "find_or_create...: dir=%s file=%s: %s\n", dir_name, file_name, isrp == NULL ? "not found" : "found"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (isrp == NULL) { /* No previous result was found. Create the entry to be referenced by @@ -8101,9 +8145,11 @@ used to find this file. db_enter(2, "push_input_stack"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 2) { fprintf(f_debug, "file_name = %s\n", full_file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Check for recursion of #includes. This is done by looking through the stack for the file name we just opened. */ @@ -8303,11 +8349,13 @@ used to find this file. pp_if_stack_depth; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("incl_search_path")) { fprintf(f_debug, "push_input_stack: search path after pushing %s:\n", full_file_name); db_incl_search_path(); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* push_input_stack */ @@ -8439,9 +8487,11 @@ at the next level down. db_enter(2, "pop_input_stack"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { db_include_guard_info(); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* First, discard any entries that were cloned for the purpose of tracking #line directives; the processing below applies to the actual @@ -8560,11 +8610,13 @@ at the next level down. if (curr_ise->file == NULL) { an_open_file_result open_result; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 2) { fprintf(f_debug, "re-opening at level %d, name = \"%s\", pos = %ld\n", depth_input_stack, curr_ise->full_name, curr_ise->position); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* This include file was closed on a push_input_stack to keep down the number of open files. Re-open it and reposition it now. */ @@ -8676,10 +8728,12 @@ at the next level down. /* The search process detected that the file has already been included, so the file was not opened. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "pop_input_stack: skipping include file %s\n", full_file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { /* A related source file was found. Make sure that the name of the @@ -8691,9 +8745,11 @@ at the next level down. } else { an_include_file_history_ptr ifhp; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, " Including text from '%s'\n", full_file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Push the new file onto the input stack and scan it. There is no "name as written" so a NULL pointer is passed in. */ @@ -8711,10 +8767,12 @@ at the next level down. actually be done in a real compilation. */ (void)fclose(f_source); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "pop_input_stack: skipping include file %s\n", full_file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { push_input_stack(f_source, (char *)NULL, display_name, @@ -8749,10 +8807,12 @@ at the next level down. push_next_preinclude_file(); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("incl_search_path")) { fprintf(f_debug, "pop_input_stack: include search path after popping:\n"); db_incl_search_path(); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* pop_input_stack */ @@ -9781,6 +9841,7 @@ literals in C++11. trigraph_column = 0; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 1) { /* Display the line just read. */ fprintf(f_debug, "Returning from read_logical_source_line, "); @@ -9824,6 +9885,7 @@ literals in C++11. } /* if */ } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return (return_value); @@ -11685,9 +11747,11 @@ source text (end of token, start of expansion, end of expansion). /* The special lint comment "notreached" (in caps), asserting that the code following is unreachable. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "lint NOTREACHED comment\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ determine_comment_pos_if_not_yet_done(); /* coverity[uninit_use_in_call] -- believes that comment_start_pos @@ -11703,9 +11767,11 @@ source text (end of token, start of expansion, end of expansion). the arguments of the function following are all used (or more accurately, that it's okay that they aren't all used). */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "lint ARGSUSED comment\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ determine_comment_pos_if_not_yet_done(); (void)add_curr_token_pseudo_pragma((a_pragma_kind)pk_lint_argsused, @@ -11740,10 +11806,12 @@ source text (end of token, start of expansion, end of expansion). curr_char_loc++; } /* while */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "lint VARARGS comment, count = %d\n", varargs_count); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ determine_comment_pos_if_not_yet_done(); @@ -12421,11 +12489,13 @@ tested is at curr_char_loc or the following position. &err_code, &err_pos); ctoken = tok_clang_version; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Numeric token = \"%.*s\", kind = clang_version\n", (int)(end_of_curr_token - start_of_curr_token + 1), start_of_curr_token); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ goto done; } /* if */ @@ -12658,6 +12728,7 @@ tested is at curr_char_loc or the following position. end_of_curr_token = curr_char_loc - 1; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { a_const_char *ks; switch (kind) { @@ -12675,6 +12746,7 @@ tested is at curr_char_loc or the following position. (int)(end_of_curr_token - start_of_curr_token + 1), start_of_curr_token, ks); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* See if there are more characters that would have been part of this number had it been scanned as a pp-number. The pp-number @@ -12771,6 +12843,7 @@ tested is at curr_char_loc or the following position. prev_ch = ch; } while (part_of_pp_num); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { if (curr_char_loc != (end_of_curr_token + 1)) { fprintf(f_debug, "Extra pp-number text: \"%.*s\"\n", @@ -12778,6 +12851,7 @@ tested is at curr_char_loc or the following position. end_of_curr_token+1); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else if (C_dialect == C_dialect_pcc && fetch_pp_tokens) { /* pcc mode has its own variant of this. Consider @@ -13116,6 +13190,7 @@ tested is at curr_char_loc or the following position. } /* if */ done: #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("scan_number")) { db_constant(&const_for_curr_token); if (const_for_curr_token.type != NULL) { @@ -13124,6 +13199,7 @@ tested is at curr_char_loc or the following position. } /* if */ fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return (ctoken); #undef skip_digit_separator @@ -15328,9 +15404,11 @@ and do no other processing. Return TRUE for a Microsoft __asm. source line. */ start_of_curr_token = NULL; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_flag_is_set("asm_string")) { fprintf(f_debug, "asm string: %s\n", body); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ scanning_microsoft_asm = FALSE; done: @@ -17114,8 +17192,10 @@ buffers. ? size : SPELLING_STORAGE_BUFFER_SIZE; #if DEBUG +/* GCOVR_EXCL_START */ ++num_spelling_storage_buffers_allocated; spelling_storage_buffer_space += (unsigned long)new_ssbp->allocated_size; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ new_ssbp->next_available = 0; new_ssbp->buffer = alloc_fe(new_ssbp->allocated_size); @@ -17344,7 +17424,9 @@ This uses the same hashing algorithm found in hash_source_string. table entry to point to the identifier representation. */ new_id_rep = alloc_fe_of_type(an_id_representation); #if DEBUG +/* GCOVR_EXCL_START */ ++num_id_representations_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ *new_id_rep = curr_id_repr; new_id_rep->next_confusable = NULL; @@ -18850,6 +18932,7 @@ end_of_token_scan_b:; } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { /* Write out the current token. */ fprintf(f_debug, "get_token%s: pos = %lu/%2d, %-10s", @@ -18883,6 +18966,7 @@ end_of_token_scan_b:; fprintf(f_debug, "%.*s\n", (int)len_of_curr_token, start_of_curr_token); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!in_preprocessing_directive) { any_tokens_fetched_from_curr_input_file = TRUE; @@ -19072,7 +19156,9 @@ to it. stsep = (a_stop_token_stack_entry_ptr) alloc_fe(sizeof(a_stop_token_stack_entry)); #if DEBUG +/* GCOVR_EXCL_START */ num_stop_token_stack_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ stsep->next = NULL; @@ -19096,6 +19182,7 @@ is saved for use when the stack is popped. } /* push_stop_token_stack */ #if DEBUG +/* GCOVR_EXCL_START */ void db_stop_tokens(void) /* @@ -19114,6 +19201,7 @@ Display the current stop token array. } /* for */ } /* db_stop_tokens */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -19131,10 +19219,12 @@ Check that the stop token array elements all made it back to zero. if (stop_tokens[token] != 0) { any_error = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level != 0) { fprintf(f_debug, "stop_tokens[\"%s\"] != 0\n", token_names[token]); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* for */ @@ -19160,7 +19250,9 @@ to alter the consistency check at the end of the routine. of the stop tokens have been reset. */ { a_boolean check_stop_tokens = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("check_stop_tokens")) check_stop_tokens = TRUE; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if EXPENSIVE_CHECKING check_stop_tokens = TRUE; @@ -19210,7 +19302,9 @@ to it. /* Allocate a new entry. */ lssep = alloc_fe_of_type(a_lexical_state_stack_entry); #if DEBUG +/* GCOVR_EXCL_START */ num_lexical_state_stack_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ lssep->next = NULL; @@ -23323,12 +23417,14 @@ a routine to lookup the appropriate instance (or generate one if needed). error_position = start_position; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { db_symbol(template_sym, "Template symbol: ", 2); } /* if */ if (debug_level >= 4) { db_symbol(new_sym, "Returning: ", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ skip_processing: @@ -24170,6 +24266,7 @@ entry with that template argument list and whose underlying type is tp. #endif /* CREATE_LEXICAL_TYPEREFS */ #if DEBUG +/* GCOVR_EXCL_START */ void db_name_qualifier(a_name_qualifier_ptr nqp) /* @@ -24214,6 +24311,7 @@ Display a name reference, for debugging purposes. fprintf(f_debug, "\n"); } /* db_name_reference */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static void make_name_qualifier(a_name_qualifier_ptr *nqp, @@ -24491,11 +24589,13 @@ describes the name specified by "locator". } /* if */ } /* for */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("name_refs") && locator->symbol_header != NULL) { db_name_reference(nrp); fprintf(f_debug, " locator name=%s\n", locator->symbol_header->identifier); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* make_name_reference_from_locator */ @@ -24526,6 +24626,7 @@ a previously created entry that can be reused. goto done; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("name_refs")) { fprintf(f_debug, "Looking for allocated name reference for: "); db_name_reference(entry_to_copy); @@ -24534,6 +24635,7 @@ a previously created entry that can be reused. } /* if */ fprintf(f_debug, " scp name=%s\n", scp->name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Look for a previously-created name reference that matches the information in the locator. */ @@ -27692,6 +27794,7 @@ See also coalesce_and_lookup_generalized_identifier. error_position = pos_curr_token; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "coalesce_and_lookup_qualified_name: "); if (return_value) { @@ -27708,6 +27811,7 @@ See also coalesce_and_lookup_generalized_identifier. fprintf(f_debug, "not qualified name\n"); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ exit: db_exit(); @@ -27933,7 +28037,9 @@ Allocate a file suffix entry, initialize it, and return a pointer to it. fsp = (a_file_suffix_ptr)alloc_general(sizeof(a_file_suffix)); #if DEBUG +/* GCOVR_EXCL_START */ num_file_suffixes_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ fsp->next = NULL; fsp->suffix = NULL; @@ -27979,9 +28085,11 @@ If the entry is already on the list the new entry is ignored. prev_fsp->next = fsp; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("add_to_file_suffix_list")) { fprintf(f_debug, "Added \"%s\" to the suffix list.\n", fsp->suffix); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* add_to_file_suffix_list */ @@ -29157,6 +29265,7 @@ temporary text buffer. } /* put_pseudo_token_end_to_temp_text_buffer */ #if DEBUG +/* GCOVR_EXCL_START */ static constexpr a_const_char *tok_dbg_bright_colors [] = { "092", "094", "091"}; @@ -29178,6 +29287,7 @@ static constexpr unsigned /* The number of colors available for use by -d-darkcolor token accenting. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static void add_cached_token_to_string( @@ -29200,6 +29310,7 @@ the string. } else if (expand_pseudo_tokens && tok->is_ifc_reference()) { put_pseudo_token_start_to_temp_text_buffer(tok); #if DEBUG +/* GCOVR_EXCL_START */ { put_str_to_temp_text_buffer(" - "); @@ -29208,6 +29319,7 @@ the string. a_string idx_as_str = s_db_lexical_ifc_index(ifc_idx); put_str_to_temp_text_buffer(idx_as_str.as_temp_characters()); } +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ put_pseudo_token_end_to_temp_text_buffer(); } else { @@ -29369,9 +29481,11 @@ and < end_tsn are included in the string. */ { #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("atcts")) { db_token_cache(cache, "add_token_cache_segment_to_string"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_cached_tokens_to_string(cache->begin(), cache->end(), start_tsn, end_tsn); @@ -29548,11 +29662,13 @@ C++/CLI delegate class types.) } /* if */ if (!define_class) goto done; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("gdoc")) { fprintf(f_debug, "Getting definition of "); db_type_name(class_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ class_type->definition_pending = TRUE; class_sym_for_context = class_sym; @@ -29627,6 +29743,7 @@ C++/CLI delegate class types.) class_def_buffer->size = size; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_metadata") || db_flag_is_set("dump_full_metadata")) { fprintf(f_debug, "Class definition for 0x%x/0x%08x: ", @@ -29634,6 +29751,7 @@ C++/CLI delegate class types.) db_dump_metadata(class_def_buffer, db_flag_is_set("dump_metadata") ? 256 : 0); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #else /* !CPPCLI_ENABLING_POSSIBLE */ /* Add code here to construct in the text buffer the string to be used to @@ -29767,10 +29885,12 @@ the caller should copy the contents as needed. /* Terminate the buffer. */ add_char_to_text_buffer(buffer, '\0'); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_metadata") || db_flag_is_set("dump_full_metadata")){ fprintf(f_debug, "Import types from %x: ", (unsigned int)idx); db_dump_metadata(buffer, db_flag_is_set("dump_metadata") ? 256 : 0); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return buffer->buffer; } /* generate_top_level_metadata_code */ @@ -29778,6 +29898,7 @@ the caller should copy the contents as needed. #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ template static void db_cached_token(const Token_type &tok) @@ -30598,6 +30719,7 @@ Display and return the amount of space used for various lexical tables. return (grand_total); } /* show_lexical_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static void create_sun_include_file_suffixes(void) @@ -30971,7 +31093,9 @@ are handled in lexical_init.) } /* for */ initialize_opname_names(); #if DEBUG +/* GCOVR_EXCL_START */ num_file_suffixes_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if INSTANTIATION_BY_IMPLICIT_INCLUSION /* Create the instantiation file suffix list. */ @@ -31011,6 +31135,7 @@ are handled in lexical_init.) pch_saved_var_array_elem(spelling_storage_buffer_tail), #endif /* UNICODE_VULNERABILITY_DETECTION_SUPPORTED */ #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_shared_token_states_allocated), pch_saved_var_array_elem(num_orig_line_modifs_allocated), pch_saved_var_array_elem(num_source_line_modifs_allocated), @@ -31024,6 +31149,7 @@ are handled in lexical_init.) pch_saved_var_array_elem(num_include_file_histories_allocated), pch_saved_var_array_elem(num_preinclude_files_allocated), pch_saved_var_array_elem(cached_pp_token_string_space), +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pch_saved_var_array_terminating_elem() }; @@ -31053,7 +31179,9 @@ are handled in lexical_init.) fn_for_function(hash_include_search_result), fn_for_function(compare_include_search_result)); #if DEBUG +/* GCOVR_EXCL_START */ num_include_search_results_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* lexical_one_time_init */ @@ -31257,6 +31385,7 @@ of the front end. prototyped_spelling = NULL; #endif /* UNICODE_VULNERABILITY_DETECTION_SUPPORTED */ #if DEBUG +/* GCOVR_EXCL_START */ num_orig_line_modifs_allocated = 0; num_source_line_modifs_allocated = 0; num_concatenation_records_allocated = 0; @@ -31279,6 +31408,7 @@ of the front end. spelling_storage_buffer_head = NULL; spelling_storage_buffer_tail = NULL; #endif /* UNICODE_VULNERABILITY_DETECTION_SUPPORTED */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if EXPENSIVE_CHECKING /* Make sure the UCN table is properly formed. Each element of the diff --git a/src/lexical.h b/src/lexical.h index 347dc99396..181c061119 100644 --- a/src/lexical.h +++ b/src/lexical.h @@ -435,9 +435,11 @@ struct a_lexical_ifc_index_reference { /* An opaque pointer to the IFC module file (an_ifc_module_file) containing this declaration. */ #if DEBUG +/* GCOVR_EXCL_START */ a_lexical_ifc_index_kind reference_kind; /* The kind of IFC index being referenced. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ }; /* a_lexical_ifc_index_reference */ @@ -931,10 +933,12 @@ EXTERN_THREAD Dyn_array used to quickly construct a new shared token. */ #if DEBUG +/* GCOVR_EXCL_START */ EXTERN_THREAD unsigned long num_shared_token_states_allocated; /* Counts of the number of a_shared_token_ctrl_block values allocated. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* @@ -1062,7 +1066,9 @@ struct a_token_cache_iterator : friend struct a_const_token_cache_iterator; #if DEBUG +/* GCOVR_EXCL_START */ friend void db_tokens(a_token_cache_iterator it); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ }; /* a_token_cache_iterator */ @@ -1089,7 +1095,9 @@ struct a_const_token_cache_iterator : INLINE const a_shared_token& operator*() const; #if DEBUG +/* GCOVR_EXCL_START */ friend void db_tokens(a_const_token_cache_iterator it); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ }; /* a_const_token_cache_iterator */ @@ -5150,6 +5158,7 @@ and all entities declared in functions. : make_name_reference((loc), (scp))) #if DEBUG +/* GCOVR_EXCL_START */ /* Show space used in the lexical routines, for debugging purposes. */ extern unsigned long show_lexical_space_used(void); @@ -5173,6 +5182,7 @@ extern void db_tokens(a_token_cache_iterator it); extern void db_tokens(a_const_token_cache_iterator it); extern void db_stop_tokens(void); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Test whether or not a given character location falls within diff --git a/src/lookup.c b/src/lookup.c index 2b68c9be3b..4a080eccf8 100644 --- a/src/lookup.c +++ b/src/lookup.c @@ -1108,6 +1108,7 @@ routine. } /* if */ set_class_membership(sym, scp, class_type); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Created: "); db_symbol(sym, "", 0); @@ -1118,6 +1119,7 @@ routine. scp->qualified_unknown_base_member ? "true" : "false"); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return sym; @@ -1211,11 +1213,13 @@ This routine is given the original symbol and creates the nonreal version. add_to_types_list(templ_param_type, DEPTH_OF_FILE_SCOPE); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("cnvont")) { fprintf(f_debug, "Created nonreal nested type:\n"); db_symbol(nonreal_sym, " Nonreal symbol: ", 4); db_symbol(orig_sym, " Original symbol: ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* create_nonreal_version_of_nested_type */ @@ -1291,9 +1295,11 @@ should be used to satisfy the lookup. is also an immediate reference. */ dps.sym->variant.routine.ptr->source_corresp.referenced = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_symbol(dps.sym, "", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return dps.sym; } /* enter_sym_for_out_of_scope_routine */ @@ -1328,9 +1334,11 @@ should be used to satisfy the lookup. is also an immediate reference. */ dps.sym->variant.variable.ptr->source_corresp.referenced = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_symbol(dps.sym, "", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return dps.sym; } /* enter_sym_for_out_of_scope_variable */ @@ -1783,6 +1791,7 @@ In Sun compatibility mode, the symbols need not be from the same scope. } /* check_for_tag_hiding */ #if DEBUG +/* GCOVR_EXCL_START */ static unsigned long functions_represented_by_symbol(a_symbol_ptr sym) /* @@ -1802,6 +1811,7 @@ it also returns a value of 1 for non-function symbols too. return result; } /* functions_represented_by_symbol */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static @@ -1840,6 +1850,7 @@ contains only invisible symbols, a NULL symbol can be returned. /* Make sure the lookup set points to the fundamental symbol. */ new_sym = fundamental_symbol_of(new_sym); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("lookup_set")) { a_decl_sequence_number decl_seq_of_symbol; /* Get the declaration sequence number to be used for this symbol. For @@ -1857,6 +1868,7 @@ contains only invisible symbols, a NULL symbol can be returned. fprintf(f_debug, " decl_seq_of_symbol=%lu\n", (unsigned long)decl_seq_of_symbol); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (curr_sym == NULL) { if (is_function_or_template_symbol(new_sym)) { @@ -1983,6 +1995,7 @@ contains only invisible symbols, a NULL symbol can be returned. } /* if */ #endif /* EXPENSIVE_CHECKING */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("lookup_set")) { if (curr_sym != NULL) { db_symbol(curr_sym, "add_symbol_to_lookup_set:", 0); @@ -1995,6 +2008,7 @@ contains only invisible symbols, a NULL symbol can be returned. } /* if */ } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return curr_sym; } /* add_symbol_to_lookup_set */ @@ -2420,6 +2434,7 @@ which the using-directives apply. a_boolean result = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("gpp_lookup")) { an_active_using_directive_ptr audp; fprintf(f_debug, "g++ using-dir lookup:\n"); @@ -2437,6 +2452,7 @@ which the using-directives apply. } /* if */ } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ visible_using_dir = nssp->using_dir_decl_seq <= lookup_state->using_dir_decl_seq || @@ -3374,10 +3390,12 @@ NULL. return_type = rout_type->variant.routine.return_type; param_list = tssp->variant.function.decl_cache->decl_info->parameters; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("conversion_lookup")) { fprintf(f_debug, "Looking for conversion template match with:\n"); db_symbol(sym, "", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* See if the type specified matches the return type of the conversion function. */ @@ -3704,10 +3722,12 @@ routine. scope. Otherwise, search part of the active list to look for an active symbol. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5 || db_flag_is_set("scope_stack_lookup")) { fprintf(f_debug, "Scope stack lookup of %s, initial lookup scope=%d\n", locator->symbol_header->identifier, depth_of_initial_lookup_scope); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (lookup_state->inclass_exception_spec && (gpp_version_is(<120000) || @@ -3733,10 +3753,12 @@ routine. } /* if */ kind = ssep->kind; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5 || db_flag_is_set("scope_stack_lookup")) { fprintf(f_debug, "Doing lookup in "); db_scope_stack_entry(ssep); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if CFRONT_GLOBAL_VS_MEMBER_NAME_LOOKUP_BUG /* Record the depth of the scope in which the symbol is being sought. */ @@ -3951,10 +3973,12 @@ routine. } /* if */ } /* for */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5 || db_flag_is_set("scope_stack_lookup")) { fprintf(f_debug, "Scope stack lookup returning "); db_symbol(sym, "", 0); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return sym; } /* scope_stack_lookup */ @@ -4059,6 +4083,7 @@ routine. a_boolean do_not_look_in_common_scopes = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5 || db_flag_is_set("instantiation_lookup")) { fprintf(f_debug, "doing instantiation lookup of %s: def_start=%d, ref_start=%d, ", @@ -4066,6 +4091,7 @@ routine. def_start, ref_start); fprintf(f_debug, "common=%d\n", common_depth); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (gpp_using_directive_lookup) { /* f_get_effective_decl_seq is used to force the declaration sequence @@ -4181,6 +4207,7 @@ routine. sym = def_sym; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5 || db_flag_is_set("instantiation_lookup")) { fprintf(f_debug, "instantiation lookup: "); if (sym == NULL) { @@ -4189,6 +4216,7 @@ routine. db_symbol(sym, "", 4); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return sym; } /* instantiation_context_lookup */ @@ -4302,10 +4330,12 @@ after a call to this routine. db_enter(4, "normal_id_lookup"); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("normal_id_lookup")) { fprintf(f_debug, "Normal lookup of %s\n", locator->symbol_header->identifier); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ sym = locator->specific_symbol; if (sym != NULL) { @@ -4421,7 +4451,9 @@ after a call to this routine. /* Fast algorithm: just search the active symbol list. */ a_symbol_ptr type_tag_symbol = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_fast_id_lookups++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /*lint --e{446,850} sym modified in loop (LINTBUG) */ for (sym = active_symbol_list; sym != NULL; sym = sym->next) { @@ -4456,7 +4488,9 @@ after a call to this routine. /* There are inactive symbols and they may be visible, so the more complicated search is required. */ #if DEBUG +/* GCOVR_EXCL_START */ num_slow_id_lookups++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* In C mode, slow lookups should only occur when the file scope has been reactivated. */ @@ -4693,6 +4727,7 @@ after a call to this routine. sym = nonreal_type_if_nested_prototype_type(sym); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { if (sym != NULL) { fprintf(f_debug, "normal_id_lookup: found %s\n", @@ -4702,6 +4737,7 @@ after a call to this routine. fprintf(f_debug, "normal_id_lookup: not found\n"); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return sym; @@ -5683,6 +5719,7 @@ symbol pointer is returned. This routine is used in both C and C++ mode. } /* if */ #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "class_qualified_id_lookup: id = %s, %s\n", (locator->symbol_header != NULL) ? @@ -5690,6 +5727,7 @@ symbol pointer is returned. This routine is used in both C and C++ mode. "NULL", (sym != NULL) ? "found" : "not found"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return sym; @@ -6093,11 +6131,13 @@ is found is returned, or NULL if no matching symbol is found. locator->specific_symbol = sym; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "enum_qualified_id_lookup: id = %s, %s\n", locator->symbol_header->identifier, (sym != NULL) ? "found" : "not found"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return sym; @@ -6535,11 +6575,13 @@ namespace. This routine is used only in C++ mode. projection symbol. */ if (sym != NULL) reduce_projection_symbol_to_fundamental_symbol(sym); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "namespace_qualified_id_lookup: id = %s, %s\n", locator->symbol_header->identifier, (sym != NULL) ? "found" : "not found"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return sym; @@ -6801,11 +6843,13 @@ file scope. locator->specific_symbol = sym; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "file_scope_id_lookup: id = %s, %s\n", locator->symbol_header->identifier, (sym != NULL) ? "found" : "not found"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* If the symbol is a projection symbol, reduce it to the fundamental symbol. The specific_symbol in the locator stays pointing to the @@ -6997,6 +7041,7 @@ list pointer in type_list. *type_list should be NULL on the first call. } /* switch */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("add_to_arg_dependent_lookup_list")) { fprintf(f_debug, "add_to_arg_dependent_lookup_list:\n"); for (tlep = *type_list; tlep != NULL; tlep = tlep->next) { @@ -7005,6 +7050,7 @@ list pointer in type_list. *type_list should be NULL on the first call. fprintf(f_debug, "\n"); } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* add_to_arg_dependent_lookup_list */ @@ -7650,6 +7696,7 @@ NULL. symbol_list = slep; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("argument_dependent_lookup")) { int i; fprintf(f_debug, "argument_dependent_lookup:\n"); @@ -7678,6 +7725,7 @@ NULL. fprintf(f_debug, "\n"); } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Free the lists used to create the symbol list. */ free_list_of_type_list_entries(*type_list); diff --git a/src/lower_c99.c b/src/lower_c99.c index 657a741e1b..ed60c5e683 100644 --- a/src/lower_c99.c +++ b/src/lower_c99.c @@ -4219,10 +4219,13 @@ Do C99 lowering on the indicated expression. */ { #if DEBUG +/* GCOVR_EXCL_START */ unsigned long checksum = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("lower_expr")) { checksum = compute_checksum_for_expr(expr); (void)fprintf(f_debug, "C99 Expression before lowering"); @@ -4230,9 +4233,11 @@ Do C99 lowering on the indicated expression. fputs(":\n", f_debug); db_expression(expr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ lower_c99_expr_full(expr, (a_statement_ptr)NULL); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("lower_expr") && (checksum != compute_checksum_for_expr(expr))) { (void)fprintf(f_debug, "C99 Expression after lowering"); @@ -4240,6 +4245,7 @@ Do C99 lowering on the indicated expression. fputs(":\n", f_debug); db_expression(expr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* lower_c99_expr */ @@ -4552,7 +4558,9 @@ Do C99 lowering on the indicated statement. */ { #if DEBUG +/* GCOVR_EXCL_START */ unsigned long checksum = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (statement != NULL) { @@ -4561,11 +4569,13 @@ Do C99 lowering on the indicated statement. a_source_position saved_error_position, saved_code_pos; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("lower_statement")) { checksum = compute_checksum_for_statement(statement); (void)fprintf(f_debug, "C99 Statement before lowering: "); db_statement(statement); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pending_stmk_init_statements = NULL; /* Track the source position. */ @@ -4706,11 +4716,13 @@ Do C99 lowering on the indicated statement. error_position = saved_error_position; code_pos_for_lowering = saved_code_pos; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("lower_statement") && (checksum != compute_checksum_for_statement(statement))) { (void)fprintf(f_debug, "C99 Statement after lowering: "); db_statement(statement); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* lower_c99_statement */ diff --git a/src/lower_eh.c b/src/lower_eh.c index 0b96251195..dc1eadf1ba 100644 --- a/src/lower_eh.c +++ b/src/lower_eh.c @@ -1392,6 +1392,7 @@ flag set value is returned. } /* if */ } /* for */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("vmi_flags")) { db_type_name(type); if (flags & VMI_DIAMOND) fprintf(f_debug, " vmi_diamond"); @@ -1400,6 +1401,7 @@ flag set value is returned. } /* if */ fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return flags; } /* vmi_flags_for_type */ diff --git a/src/lower_il.c b/src/lower_il.c index 1d88ea11fb..41f52bdf11 100644 --- a/src/lower_il.c +++ b/src/lower_il.c @@ -372,6 +372,7 @@ etc.). Return the type entry. The type is a member of the file scope. } /* make_lowered_class_type */ #if DEBUG +/* GCOVR_EXCL_START */ void db_context(a_context_ptr context) /* @@ -439,6 +440,7 @@ curr_context and dump each entry found by following the parent pointer). } /* for */ } /* db_context_stack */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ a_boolean il_lowering_needed(void) @@ -483,12 +485,14 @@ STATIC_THREAD a_scopeless_compound_stmt_ptr have been freed and are available for reuse. */ #if DEBUG +/* GCOVR_EXCL_START */ /* Count of entries allocated, for debugging purposes. */ STATIC_THREAD unsigned long num_temporary_list_entries_allocated, num_scopeless_compound_stmts_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -723,7 +727,9 @@ statement, and add it to the list of memo entries. /* Allocate a new entry. */ rmp = (a_return_memo_ptr)alloc_fe(sizeof(a_return_memo)); #if DEBUG +/* GCOVR_EXCL_START */ num_return_memos_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ rmp->next = return_memo_list; @@ -1100,11 +1106,13 @@ assumes base classes occur before fields). as the types are different). */ } else { #if DEBUG +/* GCOVR_EXCL_START */ db_abbreviated_type(struct_type); fprintf(f_debug, ", offset = %lu, new field = %s, old field = ", (unsigned long)field_offset, field_name); db_name(&next_field->source_corresp); fputc('\n', f_debug); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("add_field: two fields have the same offset"); } /* if */ @@ -1832,7 +1840,9 @@ Add the indicated temporary variable to the list of reusable temporaries. tlep = (a_temporary_list_entry_ptr) alloc_fe(sizeof(a_temporary_list_entry)); #if DEBUG +/* GCOVR_EXCL_START */ num_temporary_list_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ tlep->var = temp_var; @@ -2598,8 +2608,10 @@ class type. Such a field must exist. #if CHECKING if (result == NULL) { #if DEBUG +/* GCOVR_EXCL_START */ db_abbreviated_type(class_type); fprintf(f_debug, ", byte offset = %lu\n", (unsigned long)byte_offset); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("field_at_offset: field not found"); } /* if */ @@ -5418,11 +5430,13 @@ have_vtbl_var:; #if ABI_CHANGES_FOR_CONSTRUCTION_VTBLS #if DEBUG +/* GCOVR_EXCL_START */ /* Count of entries allocated, for debugging purposes. */ STATIC_THREAD unsigned long num_construction_vtbls_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -5436,7 +5450,9 @@ values, and return a pointer to it. cvp = (a_construction_vtbl_ptr)alloc_fe(sizeof(a_construction_vtbl)); #if DEBUG +/* GCOVR_EXCL_START */ num_construction_vtbls_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ cvp->next = NULL; cvp->variant.base_class = NULL; @@ -6216,11 +6232,13 @@ process only those bases below bcp. !base_class_has_vtbl(bcp)) { bcp->virtual_function_table_offset = *idx; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("vtbl")) { fprintf(f_debug, "Index %ld for virtual function table for ", (long)*idx); db_base_class(bcp, /*show_offset=*/TRUE); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ *idx += num_negative_vtable_entries(class_type, bcp); if (ctsp->highest_virtual_function_number != @@ -6895,6 +6913,7 @@ class_type is the class type whose vtbl is being constructed done:; #endif /* IA64_ABI */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("vtbl")) { #if !IA64_ABI db_constant(entry_aggr); @@ -6904,6 +6923,7 @@ done:; #endif /* IA64_ABI */ fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* add_vtbl_entry_init */ @@ -7203,14 +7223,17 @@ gives the offset to the virtual base class whose vtable is being made. } /* if */ offset -= (a_targ_ptrdiff_t)vbase_offset; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("vtbl")) { fprintf(f_debug, " vcall entry (prepend): "); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_vtbl_entry_init(offset, (a_routine_ptr)NULL, /*typeinfo_entry=*/FALSE, first_con, last_con, /*prepend=*/TRUE, vbase->type); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("vtbl")) { fprintf(f_debug, " vbase_offset = %ld\n", (long)vbase_offset); fprintf(f_debug, " "); @@ -7220,6 +7243,7 @@ gives the offset to the virtual base class whose vtable is being made. db_base_class(bcp, /*show_offset=*/TRUE); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ } /* add_vcall_offsets */ @@ -7579,19 +7603,23 @@ table. } /* if */ /* Create the vtable entry. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("vtbl")) { fprintf(f_debug, " vbase entry (prepend): "); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_vtbl_entry_init(delta, (a_routine_ptr)NULL, /*typeinfo_entry=*/FALSE, first_con, last_con, /*prepend=*/TRUE, class_whose_vtbl_is_being_made); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("vtbl")) { fprintf(f_debug, " "); db_base_class(imm_bcp_in_complete, /*show_offset=*/TRUE); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ /* Add virtual call offsets to the beginning of the virtual table. */ @@ -7772,9 +7800,11 @@ table. #endif /* IA64_ABI */ /* Create the initializing constants for this entry of the table. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("vtbl")) { fprintf(f_debug, " function entry: "); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_vtbl_entry_init(delta, #if IA64_ABI @@ -7788,9 +7818,11 @@ table. #if IA64_ABI if (second_func_to_call != NULL) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("vtbl")) { fprintf(f_debug, " second function entry: "); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_vtbl_entry_init(delta, #if IA64_ABI @@ -8031,6 +8063,7 @@ for the same virtual function table variable; see note below. if (definition_needed) { vtbl_var->vtable_defined = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("vtbl")) { fprintf(f_debug, "\nDefining virtual function table for "); if (bcp == NULL) { @@ -8052,6 +8085,7 @@ for the same virtual function table variable; see note below. #endif /* IA64_ABI */ } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ switch_to_file_scope_region(®ion_to_switch_back_to); /* Start the initialization by creating a ck_aggregate constant and @@ -8096,9 +8130,11 @@ for the same virtual function table variable; see note below. delta = -delta; #endif /* IA64_ABI */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("vtbl")) { fprintf(f_debug, " top + typeinfo entries: "); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_vtbl_entry_init(delta, (a_routine_ptr)NULL, @@ -8133,9 +8169,11 @@ for the same virtual function table variable; see note below. /* Put out the initialization for an extra zeroed entry at the end, for cfront compatibility. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("vtbl")) { fprintf(f_debug, " zero entry: "); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_vtbl_entry_init((a_targ_ptrdiff_t)0, (a_routine_ptr)NULL, /*typeinfo_entry=*/FALSE, first_con, last_con, @@ -15179,6 +15217,7 @@ bok_offsetof, which can include nonconstant subscripts. } /* lower_builtin_operation */ #if DEBUG +/* GCOVR_EXCL_START */ static void checksum_bytes(char *ptr, unsigned long size, @@ -15293,6 +15332,7 @@ given statement is subsequently modified. return tblock.checksum; } /* compute_checksum_for_statement */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ a_boolean is_constant_valued_expression(an_expr_node_ptr expr, @@ -16408,11 +16448,14 @@ cast. See lower_expr for typical invocation. an_expr_node_ptr temp_init_node; a_variable_ptr var, temp_var; #if DEBUG +/* GCOVR_EXCL_START */ unsigned long checksum = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ mark_as_visited(expr); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("lower_expr")) { checksum = compute_checksum_for_expr(expr); (void)fprintf(f_debug, "Expression before lowering"); @@ -16420,21 +16463,25 @@ cast. See lower_expr for typical invocation. fputs(":\n", f_debug); db_expression(expr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ change_xvalue_node_to_lvalue(expr); if (expr->is_lvalue && expr->result_is_not_used) { #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("rewrite_expr") && !db_flag_is_set("lower_expr")) { (void)fprintf(f_debug, "Lvalue expression before re-writing"); db_expr_range(expr); fputs(":\n", f_debug); db_expression(expr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* If the result of the lvalue is discarded, rewrite the expression as an rvalue. */ rewrite_discarded_lvalue_as_rvalue(expr); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("rewrite_expr") || db_flag_is_set("lower_expr")) { (void)fprintf(f_debug, "Expression after being re-written as an rvalue"); db_expr_range(expr); @@ -16443,6 +16490,7 @@ cast. See lower_expr for typical invocation. /* Re-compute checksum. */ checksum = compute_checksum_for_expr(expr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ lower_os_type(expr->type); @@ -17319,6 +17367,7 @@ cast. See lower_expr for typical invocation. } /* if */ #endif /* LOWER_VARIABLE_LENGTH_ARRAYS */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("lower_expr") && (checksum != compute_checksum_for_expr(expr))) { (void)fprintf(f_debug, "Expression after lowering"); @@ -17326,6 +17375,7 @@ cast. See lower_expr for typical invocation. fputs(":\n", f_debug); db_expression(expr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* lower_expr_full */ @@ -17387,12 +17437,14 @@ expression statement, statement points to the statement; otherwise, it is NULL. #endif /* CHECKING */ if (expr->is_lvalue && expr_to_lower->result_is_not_used) { #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("rewrite_expr")) { (void)fprintf(f_debug, "Top level lvalue expression before re-writing"); db_expr_range(expr); fputs(":\n", f_debug); db_expression(expr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* A C++-style lvalue expression whose value is discarded (often because it is at the top level). Rewrite as an rvalue. */ @@ -17404,6 +17456,7 @@ expression statement, statement points to the statement; otherwise, it is NULL. expr->is_lvalue = FALSE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("rewrite_expr")) { (void)fprintf(f_debug, "Top level expression after being re-written as an rvalue"); @@ -17411,6 +17464,7 @@ expression statement, statement points to the statement; otherwise, it is NULL. fputs(":\n", f_debug); db_expression(expr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ #if !PRESERVE_TOP_LEVEL_CASTS_TO_VOID_IN_IL @@ -18763,8 +18817,10 @@ Generate any cleanup actions required preceding the indicated goto statement. #if CHECKING if (curr_object_lifetime == NULL) { #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "common_lifetime:\n"); db_object_lifetime(common_lifetime); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str2("gen_goto_cleanup_actions:", "curr_object_lifetime is NULL, common_lifetime is not"); @@ -18807,9 +18863,11 @@ Generate any cleanup actions required preceding the indicated goto statement. #if CHECKING if (outer_lifetime == NULL) { #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "common_lifetime:\n"); db_object_lifetime(common_lifetime); db_object_lifetime_stack(); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str2( "gen_goto_cleanup_actions: common lifetime", @@ -18853,7 +18911,9 @@ such statements attached to the current entry on the context stack. scsp = (a_scopeless_compound_stmt_ptr) alloc_fe(sizeof(a_scopeless_compound_stmt)); #if DEBUG +/* GCOVR_EXCL_START */ num_scopeless_compound_stmts_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Add the entry to the front of the list. */ @@ -20219,7 +20279,9 @@ Do IL lowering of the indicated statement and everything under it. an_expr_node_ptr stmt_expr; a_source_position saved_error_position, saved_code_pos; #if DEBUG +/* GCOVR_EXCL_START */ unsigned long checksum = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (statement != NULL) { @@ -20227,11 +20289,13 @@ Do IL lowering of the indicated statement and everything under it. pending_stmk_init_statements; pending_stmk_init_statements = NULL; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("lower_statement")) { checksum = compute_checksum_for_statement(statement); (void)fprintf(f_debug, "Statement before lowering: "); db_statement(statement); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Track the source position. */ saved_code_pos = code_pos_for_lowering; @@ -20453,11 +20517,13 @@ Do IL lowering of the indicated statement and everything under it. error_position = saved_error_position; code_pos_for_lowering = saved_code_pos; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("lower_statement") && (checksum != compute_checksum_for_statement(statement))) { (void)fprintf(f_debug, "Statement after lowering: "); db_statement(statement); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* lower_statement */ @@ -20485,6 +20551,7 @@ Promote the constants on the constants list of the indicated scope constant = next_constant) { next_constant = constant->next; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { (void)fprintf(f_debug, "Promoting constant out of scope "); db_scope(scope); @@ -20492,6 +20559,7 @@ Promote the constants on the constants list of the indicated scope db_name(&constant->source_corresp); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_to_constants_list(constant, /*at_file_scope=*/TRUE); } /* for */ @@ -20523,6 +20591,7 @@ Promote the static variables on the variables list of the indicated scope variable = next_variable) { next_variable = variable->next; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { (void)fprintf(f_debug, "Promoting variable out of scope "); db_scope(scope); @@ -20530,6 +20599,7 @@ Promote the static variables on the variables list of the indicated scope db_variable(variable); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_to_variables_list(variable, DEPTH_OF_FILE_SCOPE); #if IA64_ABI @@ -20559,6 +20629,7 @@ or namespace scope) into the file scope. for (routine = scope->routines; routine != NULL; routine = next_routine) { next_routine = routine->next; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { (void)fprintf(f_debug, "Promoting routine out of scope "); db_scope(scope); @@ -20566,6 +20637,7 @@ or namespace scope) into the file scope. db_name(&routine->source_corresp); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_to_routines_list(routine, DEPTH_OF_FILE_SCOPE); #if IA64_ABI @@ -20579,6 +20651,7 @@ or namespace scope) into the file scope. rlep = rlep->next) { a_routine_ptr arout = rlep->routine; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { (void)fprintf(f_debug, "Promoting alternate entry out of scope "); db_scope(scope); @@ -20586,6 +20659,7 @@ or namespace scope) into the file scope. db_name(&arout->source_corresp); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ for (;;) { a_routine_ptr arout_next = arout->next; @@ -20618,6 +20692,7 @@ Promote the asm entries on the asm_entries list of the indicated scope asm_entry = next_asm_entry) { next_asm_entry = asm_entry->next; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { (void)fprintf(f_debug, "Promoting asm entry out of scope "); db_scope(scope); @@ -20625,6 +20700,7 @@ Promote the asm entries on the asm_entries list of the indicated scope db_name(&asm_entry->source_corresp); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_to_asm_entries_list(asm_entry); } /* for */ @@ -20697,6 +20773,7 @@ end_local_types for later processing. promote_class_members(type, promotion_scope, insert_pointer); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { (void)fprintf(f_debug, "Promoting type out of class: "); db_type_name(type); @@ -20710,6 +20787,7 @@ end_local_types for later processing. } /* if */ (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (*insert_pointer == NULL) { type->next = promotion_scope->types; @@ -20823,11 +20901,13 @@ namespace scope), at the position indicated by *insert_pointer, and or local types, promote them out of the class scope. */ if (!scope_is_null_or_placeholder(scope)) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { (void)fprintf(f_debug, "Promoting the members out of "); db_scope(scope); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Constants, static data members, and member functions are promoted to the file scope. */ @@ -20868,11 +20948,13 @@ and all subscopes. a_namespace_ptr nsp; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { (void)fprintf(f_debug, "do_scope_class_member_promotion on "); db_scope(scope); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Visit all types to find all classes. */ /* Note that when processing a function or block scope we will be crossing @@ -21216,6 +21298,7 @@ so they are left in the scope. continue; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { (void)fprintf(f_debug, "Promoting local type out of routine "); db_name(&routine->source_corresp); @@ -21223,6 +21306,7 @@ so they are left in the scope. db_type_name(type); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Mangle the name if necessary (e.g., if it is part of a template function). */ @@ -21251,9 +21335,11 @@ so they are left in the scope. if (is_immediate_enum_type(type)) { a_constant_ptr enum_con; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { (void)fprintf(f_debug, "Enum constants promoted too\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ for (enum_con = enum_constants(type); enum_con != NULL; @@ -21350,6 +21436,7 @@ been removed from the scope variables list). */ { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { (void)fprintf(f_debug, "Promoting local variable out of routine "); db_name(&routine->source_corresp); @@ -21357,6 +21444,7 @@ been removed from the scope variables list). db_variable(variable); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!is_empty_pack_parameter(variable)) { /* Mangle the name if necessary (e.g., if it is part of a template @@ -21688,11 +21776,13 @@ part of the lowering of the file scope memory region. a_boolean do_type_promotion = FALSE, do_static_promotion = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_has_traced_name(routine, iek_routine)) { (void)fprintf(f_debug, "Promoting local entities out of "); db_scope(scope); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if PROMOTE_LOCAL_ENTITIES_TO_FILE_SCOPE if (local_entities_should_be_promoted(scope)) { @@ -22078,12 +22168,14 @@ Do IL lowering of the indicated scope and everything under it. innermost_function_scope = scope; routine = scope->variant.routine.ptr; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 1) { if (routine->source_corresp.name != NULL) { fprintf(f_debug, "lower_scope: function \"%s\"\n", routine->source_corresp.name); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (routine->source_corresp.is_class_member) { /* Member function. Make sure that the class it is a member of has @@ -22776,6 +22868,7 @@ terms into C ones, so that a C back end can handle it without change. lowering_file_scope = FALSE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("lowering")) { fprintf(f_debug, "Lowering top level scope: "); db_scope(scope); @@ -22796,6 +22889,7 @@ terms into C ones, so that a C back end can handle it without change. db_object_lifetime_tree(scope->lifetime); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Put the file-scope context on the context stack. This is also done for function scope memory regions so there will be a file-scope @@ -23005,6 +23099,7 @@ The scope is the top scope in a memory region. #if DEBUG +/* GCOVR_EXCL_START */ unsigned long show_lowering_space_used(void) /* Display and return the amount of space used for various IL lowering tables. @@ -23050,6 +23145,7 @@ Display and return the amount of space used for various IL lowering tables. return grand_total; } /* show_lowering_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -23098,6 +23194,7 @@ Do one-time initialization of variables related to IL lowering. pch_saved_var_array_elem(dynamic_cast_routine), #endif /* ABI_CHANGES_FOR_RTTI */ #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_temporary_list_entries_allocated), pch_saved_var_array_elem(num_scopeless_compound_stmts_allocated), pch_saved_var_array_elem(num_init_pos_modifiers_allocated), @@ -23107,6 +23204,7 @@ Do one-time initialization of variables related to IL lowering. #if ABI_CHANGES_FOR_CONSTRUCTION_VTBLS pch_saved_var_array_elem(num_construction_vtbls_allocated), #endif /* ABI_CHANGES_FOR_CONSTRUCTION_VTBLS */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pch_saved_var_array_terminating_elem() }; @@ -23210,6 +23308,7 @@ for each compilation. avail_init_pos_modifiers = NULL; avail_destructible_entity_descrs = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_temporary_list_entries_allocated = 0; num_scopeless_compound_stmts_allocated = 0; num_init_pos_modifiers_allocated = 0; @@ -23217,14 +23316,17 @@ for each compilation. #if ABI_CHANGES_FOR_CONSTRUCTION_VTBLS num_construction_vtbls_allocated = 0; #endif /* ABI_CHANGES_FOR_CONSTRUCTION_VTBLS */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ code_pos_for_lowering = null_source_position; avail_return_memos = NULL; avail_temporary_list_entries = NULL; avail_scopeless_compound_stmts = NULL; #if DEBUG +/* GCOVR_EXCL_START */ allocated_name_string_length = 0; num_return_memos_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if ENSURE_LOWERED_TYPE_LIST_ORDERING /* If we are going to run the C-generating back end, the types list must be diff --git a/src/lower_il.h b/src/lower_il.h index d7608b39d5..706d23ceca 100644 --- a/src/lower_il.h +++ b/src/lower_il.h @@ -393,12 +393,14 @@ EXTERN_THREAD a_destructible_entity_descr_ptr #if DEBUG +/* GCOVR_EXCL_START */ /* Count of entries allocated, for debugging purposes. */ EXTERN_THREAD unsigned long num_init_pos_modifiers_allocated, num_destructible_entity_descrs_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -1367,6 +1369,7 @@ extern void eliminate_expr_object_lifetime(an_expr_node_ptr expr); extern void clean_up_all_object_lifetimes(a_scope_ptr scope); #if DEBUG +/* GCOVR_EXCL_START */ extern unsigned long show_lowering_space_used(void); extern unsigned long compute_checksum_for_expr(an_expr_node_ptr expr); @@ -1376,6 +1379,7 @@ extern unsigned long compute_checksum_for_statement(a_statement_ptr statement); extern void db_context(a_context_ptr context); extern void db_context_stack(void); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ extern void function_lower_init(void); diff --git a/src/lower_init.c b/src/lower_init.c index 60d349697c..2e2388ec3f 100644 --- a/src/lower_init.c +++ b/src/lower_init.c @@ -1069,7 +1069,9 @@ sometimes allocated on the stack. /* Allocate a new entry. */ ipmp = (an_init_pos_modifier_ptr)alloc_fe(sizeof(an_init_pos_modifier)); #if DEBUG +/* GCOVR_EXCL_START */ num_init_pos_modifiers_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ clear_init_pos_modifier(ipmp); @@ -1273,7 +1275,9 @@ and return a pointer to it. dedp = (a_destructible_entity_descr_ptr) alloc_fe(sizeof(a_destructible_entity_descr)); #if DEBUG +/* GCOVR_EXCL_START */ num_destructible_entity_descrs_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ clear_destructible_entity_descr(dedp); @@ -4629,6 +4633,7 @@ is TRUE, the original constructor initializers are removed from from_scope. &from_scope->variant.routine.constructor_inits; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("copy_ctor_inits")) { (void)fprintf(f_debug, "Before: from lifetime = "); db_object_lifetime(from_scope->lifetime); @@ -4639,6 +4644,7 @@ is TRUE, the original constructor initializers are removed from from_scope. db_dynamic_initializer(ctor_init->initializer, 0); } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_assertion(from_scope->kind == (a_scope_kind)sck_function && to_scope->kind == (a_scope_kind)sck_function); @@ -4711,6 +4717,7 @@ is TRUE, the original constructor initializers are removed from from_scope. from_scope->lifetime = NULL; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("copy_ctor_inits")) { (void)fprintf(f_debug, "After: from lifetime = "); db_object_lifetime(from_scope->lifetime); @@ -4729,6 +4736,7 @@ is TRUE, the original constructor initializers are removed from from_scope. db_dynamic_initializer(ctor_init->initializer, 0); } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* copy_ctor_inits */ @@ -7868,10 +7876,12 @@ code at *insert_location and update *insert_location accordingly. (an_expr_node_ptr)NULL, /*call_can_be_virtual=*/FALSE)) { #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("remove_ctors_dtors")) { (void)fprintf(f_debug, "Removing static destruction for: "); db_dynamic_initializer(dip, 0); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* There's no need to call the destructor; skip the destruction processing altogether. */ @@ -9767,10 +9777,12 @@ This would require a multi-pass version of lowering. tblock.result = TRUE; traverse_statement(scope->assoc_block, &tblock); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("remove_ctors_dtors")) { db_scope(scope); (void)fprintf(f_debug, " has %s effect.\n", tblock.result ? "no" : "an"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return tblock.result; } /* ctor_or_dtor_body_has_no_effect */ @@ -9863,6 +9875,7 @@ statement/expression lowering process (mostly by lower_dynamic_init). (a_special_function_kind)sfk_destructor) && scope->variant.routine.constructor_inits != NULL); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("remove_ctors_dtors")) { db_scope(scope); (void)fprintf(f_debug, "\nBefore: lifetime = "); @@ -9876,6 +9889,7 @@ statement/expression lowering process (mostly by lower_dynamic_init). } /* for */ } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* For scopes with constructor_inits (i.e., constructors and destructors), start with those and remove any calls to constructors and destructors @@ -9931,6 +9945,7 @@ statement/expression lowering process (mostly by lower_dynamic_init). remove_unneeded_destructions_from_lifetime(olp); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("remove_ctors_dtors")) { (void)fprintf(f_debug, "After: lifetime = "); db_object_lifetime(scope->lifetime); @@ -9943,6 +9958,7 @@ statement/expression lowering process (mostly by lower_dynamic_init). } /* for */ } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (routine->is_delegating_ctor && scope->variant.routine.constructor_inits == NULL) { @@ -10136,10 +10152,12 @@ C99 mode for the same reason. zero-initialization if the object is value-initialized otherwise no initialization is necessary. */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("remove_ctors_dtors")) { (void)fprintf(f_debug, "Removing construction for: "); db_dynamic_initializer(dip, 0); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ remove_constructor_with_no_effect(dip); } /* if */ @@ -12049,10 +12067,12 @@ arrays with class elements. /* There's no need to call this constructor (zero_storage has already been set above if zero-initialization is required). */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("remove_ctors_dtors")) { (void)fprintf(f_debug, "Removing array new construction for: "); db_dynamic_initializer(elem_dip, 0); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ remove_constructor_with_no_effect(elem_dip); ctor_routine = NULL; @@ -12065,10 +12085,12 @@ arrays with class elements. may be necessary (i.e., a throw during construction) are handled by the delete routine. */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("remove_ctors_dtors")) { (void)fprintf(f_debug, "Removing array new destruction for: "); db_dynamic_initializer(elem_dip, 0); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ elem_dip->destructor = NULL; } /* if */ @@ -12694,10 +12716,12 @@ The subtree of the node has not yet been lowered. dip->variant.constructor.args, /*call_can_be_virtual=*/FALSE)) { #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("remove_ctors_dtors")) { (void)fprintf(f_debug, "Removing new construction for: "); db_dynamic_initializer(dip, 0); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* There's no need to call this constructor. */ remove_constructor_with_no_effect(dip); @@ -13093,10 +13117,12 @@ The subtree of the node has not yet been lowered. (an_expr_node_ptr)NULL, /*call_can_be_virtual=*/TRUE)) { #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("remove_ctors_dtors")) { (void)fprintf(f_debug, "Removing delete destruction for: "); db_dynamic_initializer(dip, 0); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* There's no need to call the destructor; change the destructor call into a "delete" call. */ @@ -14213,6 +14239,7 @@ directly. *con_pos will be set to indicate the simple constant. simple_con = copy_unshared_constant(rep_con); first_repeat_con->next = simple_con; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "Splitting constant, constant before = "); db_constant(first_repeat_con); @@ -14220,6 +14247,7 @@ directly. *con_pos will be set to indicate the simple constant. db_constant(simple_con); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { /* The position is at the beginning of the repeat, so there is no @@ -14271,12 +14299,14 @@ directly. *con_pos will be set to indicate the simple constant. copy_constant(rep_con, con); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "Splitting constant, no constant before, simple_con = "); db_constant(simple_con); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ if (second_count != 0) { @@ -14299,22 +14329,26 @@ directly. *con_pos will be set to indicate the simple constant. simple_con->next = second_repeat_con; second_repeat_con->next = next_con; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "Splitting constant, constant after = "); db_constant(second_repeat_con); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { /* The position is at the end of the repeat, so there is no repeated constant following the simple constant. */ simple_con->next = next_con; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "Splitting constant, no constant after.\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* The new current position is on the non-repeated actual constant. */ @@ -14374,9 +14408,11 @@ is not called for union initializations. prev_con->next = zero_con; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "Finding insert point: inserting at end\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ set_init_con_pos(zero_con, /*skip_empty_bases=*/TRUE, /*skip_empty_fields=*/FALSE, &con); @@ -14388,11 +14424,13 @@ is not called for union initializations. if (count > 1) { a_constant_ptr repeat_con = alloc_repeated_constant(zero_con, count); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "Array repeat const = "); db_constant(repeat_con); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ set_init_con_pos(repeat_con, /*skip_empty_bases=*/TRUE, /*skip_empty_fields=*/FALSE, &con); @@ -14439,6 +14477,7 @@ is not called for union initializations. *previous_con = prev_con; *earlier_con = con; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "Found insert point, previous_con = "); db_constant(*previous_con); @@ -14446,6 +14485,7 @@ is not called for union initializations. db_constant(earlier_con->ptr); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* find_designator_insert_point */ @@ -14511,6 +14551,7 @@ values are being overwritten by the current aggregate. found_insert_point = TRUE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (found_insert_point && db_flag_is_set("designators")) { (void)fprintf(f_debug, "Quickly found insert point, prev_con = "); db_constant(*prev_con); @@ -14518,6 +14559,7 @@ values are being overwritten by the current aggregate. db_constant(earlier_con->ptr); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ return found_insert_point; @@ -14550,12 +14592,14 @@ different than the old member), the old value is added to set_init_con_pos(old_con, /*skip_empty_bases=*/TRUE, /*skip_empty_fields=*/FALSE, earlier_con); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "Initializing same member of union, earlier_con->ptr = "); db_constant(earlier_con->ptr); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { /* Different member. Add the old constant to saved_union_init_constant. */ @@ -14566,11 +14610,13 @@ different than the old member), the old value is added to *saved_union_init_constant = old_con; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "saved_union_init_constant = "); db_constant(*saved_union_init_constant); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Clear *earlier_con. */ set_init_con_pos((a_constant_ptr)NULL, /*skip_empty_bases=*/TRUE, @@ -14620,11 +14666,13 @@ This is DR 413 in the C standard. il_identical_types(first->type, second->type)); a_dynamic_init_ptr dip = first->variant.dynamic_init.ptr; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "constant with explicit initialization = "); db_constant(first); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ temp = make_lowered_temporary(first->type); set_var_init_pos_descr(temp, &ipd); @@ -14717,11 +14765,13 @@ This is DR 413 in the C standard. } /* if */ second->is_implicit_initialization = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "remaining constant = "); db_constant(second); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* combine_initializers_with_implicit_initialization */ @@ -14785,11 +14835,13 @@ designated initializers for base classes), but must process empty fields. advance_init_con_pos(&earlier_con); temp_con = temp_con->next; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "prev_union_designator = "); db_constant(prev_union_designator); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ if (con.ptr != NULL && @@ -14926,11 +14978,13 @@ designated initializers for base classes), but must process empty fields. /* Combine the two initializers. */ combine_initializer_constants(earlier_con.ptr, con.ptr); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "Combined initializer consts = "); db_constant(con.ptr); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -14943,6 +14997,7 @@ designated initializers for base classes), but must process empty fields. if (con.ptr != NULL) { check_assertion(con.ptr->kind == (a_constant_repr_kind)ck_designator); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "Starting on designator "); db_constant(con.ptr); @@ -14953,6 +15008,7 @@ designated initializers for base classes), but must process empty fields. db_constant(aggr_con); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Disconnect the ck_designator and the list that follows it from the aggregate. */ @@ -14962,11 +15018,13 @@ designated initializers for base classes), but must process empty fields. prev_con->next = NULL; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "aggr_con after detaching designator = "); db_constant(aggr_con); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Keep the end of list pointer up to date. */ @@ -14986,11 +15044,13 @@ designated initializers for base classes), but must process empty fields. } /* while */ aggr_con->variant.aggregate.last_constant = earlier_con.ptr; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "aggr_con after adding to end = "); db_constant(aggr_con); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Exit the outer loop unless we've run into a ck_designator. */ @@ -15013,11 +15073,13 @@ designated initializers for base classes), but must process empty fields. } else { union_designator = con.ptr; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "union_designator = "); db_constant(union_designator); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Overwrite the previous value if it's for the same member of the @@ -15063,11 +15125,13 @@ designated initializers for base classes), but must process empty fields. prev_con->next = con.ptr; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "After relinking around designator = "); db_constant(aggr_con); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ /* For a union in which more than one member was initialized, combine @@ -15079,11 +15143,13 @@ designated initializers for base classes), but must process empty fields. combine_initializer_constants(saved_union_init_constant, aggr_con->variant.aggregate.first_constant); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "After combining union initializers = "); db_constant(aggr_con->variant.aggregate.first_constant); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* For a union initialization, re-insert a ck_designator if the field @@ -15093,11 +15159,13 @@ designated initializers for base classes), but must process empty fields. aggr_con->variant.aggregate.first_constant = union_designator; check_assertion(union_designator->next != NULL); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("designators")) { (void)fprintf(f_debug, "After reinsertion of union designator = "); db_constant(aggr_con); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ #if EXPENSIVE_CHECKING @@ -15768,9 +15836,11 @@ subobject pointed to by expr. } /* for */ #if CHECKING #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "class_type: "); db_abbr_type(class_type); fprintf(f_debug, "\n"); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str2("make_construction_vtbl_transfer_pointer_lvalue", "did not find usable pointer"); diff --git a/src/lower_name.c b/src/lower_name.c index 122cda012f..6595372051 100644 --- a/src/lower_name.c +++ b/src/lower_name.c @@ -1363,12 +1363,14 @@ above, NULL is also returned in this case). /* We're done with this mangling text buffer. */ pop_mangling_text_buffer(); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("mangled_names")) { if (scp != NULL) { db_name(scp); } /* if */ fprintf(f_debug, " -> %s\n", buffer); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return buffer; } /* end_mangling_full */ @@ -7593,7 +7595,9 @@ is TRUE. default: /* Unexpected expression kind. */ #if DEBUG +/* GCOVR_EXCL_START */ db_expression(expr); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str( "mangled_encoding_for_expression_full: bad kind"); @@ -9389,8 +9393,10 @@ entity for mangling purposes. if (!class_type_has_body(type) && !type->variant.class_struct_union.is_nonreal_class) { #if DEBUG +/* GCOVR_EXCL_START */ (void)fprintf(f_debug, "Parent class = "); db_abbr_type(type); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str( "r_mangled_parent_qualifier: parent class has no body"); @@ -12286,11 +12292,13 @@ by ttt_scp_for_implicit_abi_tags, otherwise terminate the walk. wpcb->terminate = TRUE; } else { #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("abi_tag")) { (void)fputs("Considering unmarked entity ", f_debug); db_name(scp); (void)fputs("\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_assertion(!entity_is_marked(scp, kind)); if (kind == iek_type) { @@ -12311,11 +12319,13 @@ by ttt_scp_for_implicit_abi_tags, otherwise terminate the walk. an_attribute_arg_ptr aap; an_attribute_ptr ap; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("abi_tag")) { (void)fputs("Adding implicit abi_tags from ", f_debug); db_name(scp); (void)fputs("\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ for (ap = scp->attributes; ap != NULL; ap = ap->next) { if (ap->kind == ak_abi_tag) { @@ -12329,9 +12339,11 @@ by ttt_scp_for_implicit_abi_tags, otherwise terminate the walk. that already appear in the mangled name. */ if (abi_tag_is_on_list(aap->variant.constant, implicit_tag_list)) { #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("abi_tag")) { (void)fputs("Ignoring duplicate abi_tag\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { add_implicit_abi_tag_attribute(ttt_scp_for_implicit_abi_tags, @@ -12389,12 +12401,14 @@ of the specified type to ttt_mark_value. a_walk_parents_control_block wpcb; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("abi_tag")) { (void)fprintf(f_debug, "%s type ", ttt_mark_value ? "Marking" : "Unmarking"); db_name(&type->source_corresp); (void)fputs("\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ type->source_corresp.entity_marked = ttt_mark_value; if (is_immediate_class_type(type)) { @@ -12429,12 +12443,14 @@ any related entities that would appear in the mangled name of the entity. } else { scp->entity_marked = ttt_mark_value; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("abi_tag")) { (void)fprintf(f_debug, "%s entity ", ttt_mark_value ? "Marking" : "Unmarking"); db_name(scp); (void)fputs("\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (scp == ttt_scp_for_implicit_abi_tags) { /* If we're marking the entity for which we're computing the implicit @@ -12609,6 +12625,7 @@ As implemented here, this involves three steps: implicit_tag_list = NULL; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("abi_tag")) { (void)fputs("Implicit abi_tags for ", f_debug); db_name(scp); @@ -12621,6 +12638,7 @@ As implemented here, this involves three steps: (void)fputs("\n", f_debug); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -13439,7 +13457,9 @@ is TRUE, a routine otherwise. function_name_mangling_needed((a_routine_ptr)scp, &dummy)) { #if DEBUG +/* GCOVR_EXCL_START */ db_entity_info((char *)scp, is_variable ? iek_variable : iek_routine); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("externalize_mangled_name: name not mangled"); } /* if */ @@ -15690,7 +15710,9 @@ values, and return a pointer to it. cspp = (a_compressible_string_pos_ptr)alloc_general( sizeof(a_compressible_string_pos)); #if DEBUG +/* GCOVR_EXCL_START */ num_compressible_string_pos_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ cspp->next = NULL; @@ -16026,7 +16048,9 @@ initialized for each compilation. #if !IA64_ABI avail_compressible_string_pos = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_compressible_string_pos_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* !IA64_ABI */ active_parents = alloc_fe_of_type(an_active_parent_map); diff --git a/src/lower_name.h b/src/lower_name.h index aa5b5662f7..40e45ba081 100644 --- a/src/lower_name.h +++ b/src/lower_name.h @@ -56,11 +56,13 @@ EXTERN_THREAD a_compressible_string_pos_ptr and available for reuse. */ #if DEBUG +/* GCOVR_EXCL_START */ /* Count of entries allocated, for debugging purposes. */ EXTERN_THREAD unsigned long num_compressible_string_pos_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* !IA64_ABI */ diff --git a/src/macro.c b/src/macro.c index 6f52ef82a6..3d3189e968 100644 --- a/src/macro.c +++ b/src/macro.c @@ -493,6 +493,7 @@ STATIC_THREAD a_boolean should be suppressed or included. */ #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_macro_params_allocated, num_macro_defs_allocated, @@ -501,6 +502,7 @@ STATIC_THREAD unsigned long param_name_string_space, macro_definition_space; /* Used to track space use. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ STATIC_THREAD a_const_char @@ -1938,7 +1940,9 @@ ensure_arg_raw_text_space. catastrophe(ec_requested_size_too_large); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ macro_arg_text_space += (unsigned long)increment; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Allocate one more byte than required, so that a pointer past the end will not have the same address as a pointer to the next object in @@ -2035,7 +2039,9 @@ ensure_arg_expanded_text_space. catastrophe(ec_requested_size_too_large); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ macro_arg_text_space += (unsigned long)increment; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Allocate one more byte than required, so that a pointer past the end will not have the same address as a pointer to the next object in @@ -2081,7 +2087,9 @@ to it. mpp = (a_macro_param_ptr)alloc_fe(sizeof(a_macro_param)); #if DEBUG +/* GCOVR_EXCL_START */ num_macro_params_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ mpp->name = NULL; mpp->next = NULL; @@ -2122,7 +2130,9 @@ to default values, and return a pointer to it. mdp = (a_macro_def_ptr)alloc_fe(sizeof(a_macro_def)); #if DEBUG +/* GCOVR_EXCL_START */ num_macro_defs_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ clear_macro_def(mdp); return (mdp); @@ -2151,7 +2161,9 @@ and return a pointer to it. alloc_fe, so that the raw_text storage can be kept around. */ map = (a_macro_arg_ptr)alloc_general(sizeof(a_macro_arg)); #if DEBUG +/* GCOVR_EXCL_START */ num_macro_args_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Allocate an initial raw text array. This can be expanded later if necessary, but the size here should be able to cover most @@ -2163,7 +2175,9 @@ and return a pointer to it. memory. */ map->raw_text = alloc_resizable_buffer((sizeof_t)(map->raw_alloc_len+1)); #if DEBUG +/* GCOVR_EXCL_START */ macro_arg_text_space += (unsigned long)(map->raw_alloc_len); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Likewise for the macro-expanded text array. */ map->expanded_alloc_len = ARG_EXPANDED_TEXT_INITIAL_ALLOCATION; @@ -2173,7 +2187,9 @@ and return a pointer to it. map->expanded_text = alloc_resizable_buffer( (sizeof_t)(map->expanded_alloc_len+1)); #if DEBUG +/* GCOVR_EXCL_START */ macro_arg_text_space += (unsigned long)(map->expanded_alloc_len); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if FULLY_RESOLVED_MACRO_POSITIONS init_macro_text_map(MACRO_ARGUMENT_TEXT_MAP_INITIAL_COUNT, @@ -2214,6 +2230,7 @@ Free the macro argument description pointed to by *map, and set *map to NULL. #if DEBUG +/* GCOVR_EXCL_START */ static void print_markered_text(a_const_char *str, sizeof_t len, a_boolean go_to_end_of_line) @@ -2341,6 +2358,7 @@ print the replacement text and expansions of macros. } /* for */ } /* print_markered_text */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -3735,11 +3753,13 @@ is not allowed. } /* if */ } #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "Tacking rest of containing line onto macro expansion:\n%.*s\n", (int)num_chars_added_from_source_line, loc_following_insertion); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ensure_aux_buffer_for_pcc_macros_space(num_chars_added_from_source_line, pos_in_aux_buffer); @@ -5915,10 +5935,12 @@ associated global variables will also have been set). /* See standard, 3.8.3 (Macro Replacement). */ db_enter(4, "macro_invocation"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "About to expand invocation of macro %s:\n", macro_symbol->header->identifier); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if FULLY_RESOLVED_MACRO_POSITIONS src_pos.seq = 0; @@ -6165,9 +6187,11 @@ end_scan_for_macro_modifs:; LE_INERT_MACRO escape sequence followed by the identifier string. */ make_inert_macro: #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Macro is inert, left as identifier.\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ is_macro_call = FALSE; got_proper_closing_token = TRUE; @@ -6563,10 +6587,12 @@ end_scan_for_macro_modifs:; check_for_following_parenthesis(&paren_found, /*allow_id=*/FALSE); if (!paren_found) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "Potential macro not followed by \"(\", left as identifier.\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (macro_symbol == has_cpp_attribute_symbol || macro_symbol == has_c_attribute_symbol) { @@ -6946,12 +6972,14 @@ end_scan_for_macro_modifs:; } /* if */ #endif /* FULLY_RESOLVED_MACRO_POSITIONS */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "raw argument %s: \"", pp != NULL ? pp->name : ""); print_markered_text(map->raw_text, map->raw_len, FALSE); fputs("\"\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Generate a warning on an empty macro argument, since that is "undefined" behavior according to the standard. Do not @@ -7211,6 +7239,7 @@ end_scan_for_macro_modifs:; terminate_macro_text_map(&tracker, map->expanded_len+LE_ESCAPE_LEN); #endif /* FULLY_RESOLVED_MACRO_POSITIONS */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "expanded argument %s: \"", pp != NULL ? pp->name : ""); @@ -7221,6 +7250,7 @@ end_scan_for_macro_modifs:; print_markered_text(map->expanded_text, (sizeof_t)-1, FALSE); fputs("\"\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Remove the temporary source line modification that put the raw argument text back into the source line. */ @@ -7523,11 +7553,13 @@ end_arg_expansion:; in_macro_arg_list = saved_in_macro_arg_list; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Arguments scanned, about to do replacement of macro %s:\n", macro_symbol->header->identifier); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!got_proper_closing_token) { /* Did not get proper closing token, so do not do the replacement. @@ -7789,9 +7821,11 @@ end_arg_expansion:; in the case of an expanded argument value, the expansion may be further modified by source line modifications. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Expansion length is %u\n", (unsigned int)repl_text_len); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Make enough room in macro_buffer for the expansion, an LE_END_OF_TOP_LEVEL_EXPANSION or LE_EMPTY_VARIADIC_MACRO escape, if @@ -8457,6 +8491,7 @@ end_arg_expansion:; delete_source_from_loc = NULL; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Remaining source after expansion of macro %s (*rescan = %s):\n", @@ -8466,6 +8501,7 @@ end_arg_expansion:; fprintf(f_debug, "macro_buffer size = %d\n", (int)(next_avail_in_macro_buffer - macro_buffer)); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ macro_depth = saved_macro_depth; in_macro_arg_list = saved_in_macro_arg_list; @@ -8569,10 +8605,12 @@ start_of_white_space_in_cpp_string). if (curr_char_loc == end_of_cpp_string) end_of_cpp_string = NULL; curr_char_loc++; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "mdefn_get_token: cpp quote , \"%.*s\"\n", (int)len_of_curr_token, start_of_curr_token); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else if (*curr_char_loc == '/' && *(curr_char_loc+1) == '*') { /* The sequence / * inside a string should not be interpreted as @@ -8582,10 +8620,12 @@ start_of_white_space_in_cpp_string). len_of_curr_token = 1; curr_char_loc++; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "mdefn_get_token: slash , \"%.*s\"\n", (int)len_of_curr_token, start_of_curr_token); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else if (*curr_char_loc == 'L' && (*(curr_char_loc+1) == '"' || *(curr_char_loc+1) == '\'')) { @@ -8597,10 +8637,12 @@ start_of_white_space_in_cpp_string). len_of_curr_token = 1; curr_char_loc++; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "mdefn_get_token: identifier, \"%.*s\"\n", (int)len_of_curr_token, start_of_curr_token); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { /* Any other case within a cpp string -- get a token. */ @@ -8658,11 +8700,13 @@ start_of_white_space_in_cpp_string). goto quote_process; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { if (curr_token == tok_identifier) { fprintf(f_debug, "*param_num = %d\n", (int)(*param_num)); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ return (curr_token); @@ -8966,6 +9010,7 @@ IL entry. #endif /* RECORD_MACROS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ static void db_dump_macro_def(a_symbol_ptr assoc_symbol, a_boolean object_like, a_macro_param_ptr param_list, @@ -9050,6 +9095,7 @@ beginning of the encoding of the replacement list. fprintf(f_debug, " end\n"); } /* if */ } /* db_dump_macro_def */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static a_boolean equiv_replacement_text(char *repl_text, @@ -9374,7 +9420,9 @@ Scan and process a #define directive. (void)memcpy(pp->name, "__VA_ARGS__", sizeof("__VA_ARGS__")); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ param_name_string_space += (unsigned long)(strlen(pp->name)+1); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (param_list == NULL) { param_list = pp; @@ -9385,10 +9433,12 @@ Scan and process a #define directive. } /* if */ last_param = pp; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "macro parameter %d: %s\n", (int)param_num, pp->name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Eat the identifier or ellipsis that names the parameter: */ (void)get_token(); @@ -9894,9 +9944,11 @@ Scan and process a #define directive. unclosed string. */ end_of_cpp_string = NULL; #if DEBUG +/* GCOVR_EXCL_START */ if (assoc_symbol != NULL) { db_dump_macro_def(assoc_symbol, object_like, param_list, buffer_start); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ mdp = NULL; if (redefinition) { @@ -9966,9 +10018,11 @@ Scan and process a #define directive. /* A predefined macro that changes the definition of an existing macro is always catastrophic. */ #if DEBUG +/* GCOVR_EXCL_START */ make_definition_string(assoc_symbol); fprintf(f_debug, "Previous definition was:\n %s\n", temp_text_buffer); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ str_catastrophe(ec_bad_predef_macro_redef, assoc_symbol->header->identifier); @@ -10047,7 +10101,9 @@ Scan and process a #define directive. repl_text_len = (sizeof_t)(next_avail_in_macro_buffer - buffer_start); repl_text = alloc_fe((sizeof_t)(repl_text_len+1)); #if DEBUG +/* GCOVR_EXCL_START */ macro_definition_space += (unsigned long)(repl_text_len+1); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ (void)memcpy(repl_text, buffer_start, size_t_arg(repl_text_len)); repl_text[repl_text_len] = (char)rt_end; @@ -10358,11 +10414,13 @@ token-list. some_error_in_curr_directive = TRUE; } else { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "Processing #assert %s", predicate_entry->name); if (token_str != NULL) fprintf(f_debug, " ( %s )", token_str); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Only add a value if there was a token sequence. */ if (token_str != NULL) add_assert_value(token_str, predicate_entry); @@ -10411,11 +10469,13 @@ or /* There's no existing entry, so there's nothing to undo. */ } else { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "Processing #unassert %s", predicate_entry->name); if (token_str != NULL) fprintf(f_debug, " ( %s )", token_str); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (token_str == NULL) { /* There was no token sequence, so remove the entire predicate, not @@ -11077,9 +11137,11 @@ TRUE) and "-U" (when process_undefs is TRUE) options on the command line. a_symbol_ptr assoc_symbol; a_symbol_locator locator; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Command-line undef: %s\n", du_str); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Check the identifier to make sure it is valid. */ if (!is_valid_identifier(du_str, (sizeof_t)strlen(du_str), &assoc_symbol, @@ -11466,9 +11528,11 @@ that occurred. a_symbol_ptr macro_sym; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("predef_macro_entry")) { fprintf(f_debug, "Predef macro line: %s\n", line); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #define skip_blanks() for (; *ptr == ' ' || *ptr == '\t'; ++ptr) {} *error_code = ec_no_error; @@ -11563,6 +11627,7 @@ that occurred. a_macro_def_ptr mdp = macro_sym->variant.macro_def; mdp->cannot_be_redefined = cannot_redefine; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("predef_macro_entry")) { char* name = ptr; char saved_ch; @@ -11576,6 +11641,7 @@ that occurred. ptr, mdp->object_like ? "TRUE" : "FALSE", cannot_redefine ? "TRUE" : "FALSE"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -12708,6 +12774,7 @@ command line -D options. #if DEBUG +/* GCOVR_EXCL_START */ unsigned long show_macro_space_used(void) /* Display and return the amount of space used for various macro tables. @@ -12742,6 +12809,7 @@ Display and return the amount of space used for various macro tables. return (grand_total); } /* show_macro_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -12793,8 +12861,10 @@ Do one-time initialization of variables related to macro processing. } /* if */ avail_macro_args = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_macro_args_allocated = 0; macro_arg_text_space = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ registered_pointers = NULL; macro_buffer_region_in_progress = NULL; @@ -12829,10 +12899,12 @@ Do one-time initialization of variables related to macro processing. pch_saved_var_array_elem(assert_predicates), #endif /* ATT_PREPROCESSING_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_macro_params_allocated), pch_saved_var_array_elem(num_macro_defs_allocated), pch_saved_var_array_elem(param_name_string_space), pch_saved_var_array_elem(macro_definition_space), +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if RECORD_MACRO_INVOCATIONS pch_saved_var_array_elem(last_macro_invocation_record_block), @@ -12947,6 +13019,7 @@ initialized for each compilation. active_text_map_position_trackers = NULL; #endif /* FULLY_RESOLVED_MACRO_POSITIONS */ #if DEBUG +/* GCOVR_EXCL_START */ num_macro_params_allocated = 0; num_macro_defs_allocated = 0; /* num_macro_args_allocated is not per-compilation and should not be @@ -12955,6 +13028,7 @@ initialized for each compilation. cleared. */ param_name_string_space = 0; macro_definition_space = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* macro_init */ diff --git a/src/macro.h b/src/macro.h index 521a07dac8..724da4800b 100644 --- a/src/macro.h +++ b/src/macro.h @@ -186,8 +186,10 @@ extern a_boolean is_valid_identifier(a_const_char *id_start, extern void choose_raw_or_expanded_arg(void); #if DEBUG +/* GCOVR_EXCL_START */ /* Show and return the amount of space used by macro entries. */ extern unsigned long show_macro_space_used(void); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ extern void macro_one_time_init(void); diff --git a/src/mem_manage.c b/src/mem_manage.c index f45149a545..d0bc54da4c 100644 --- a/src/mem_manage.c +++ b/src/mem_manage.c @@ -114,6 +114,7 @@ static sizeof_t adjusted_header_size = (sizeof_t)(sizeof(a_mem_block_header) + #if DEBUG +/* GCOVR_EXCL_START */ /* Record of memory allocated, for space tracking purposes. */ @@ -187,9 +188,11 @@ STATIC_THREAD unsigned long STATIC_THREAD unsigned long num_text_buffers_allocated; /* Number of text buffers that have been allocated. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if DEBUG +/* GCOVR_EXCL_START */ static void adjust_record_of_total_allocation(long amount) /* Record that an additional "amount" bytes of memory have been allocated. @@ -211,6 +214,7 @@ and "freed" here mean via malloc/free, not by some mechanism on top of that. max_mem_allocated = (num_bytes_allocated - num_bytes_freed); } /* if */ } /* adjust_record_of_total_allocation */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static char *malloc_with_check(sizeof_t size) @@ -235,6 +239,7 @@ allocation and generates a catastrophic error. catastrophe(ec_out_of_memory); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ /* Track total allocation. */ /* Can't do this conditionally on db_active since db_active is not yet set when command line processing is done. */ @@ -244,6 +249,7 @@ allocation and generates a catastrophic error. (unsigned long)size, (a_void_ptr)ptr, (unsigned long)(num_bytes_allocated - num_bytes_freed)); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return (ptr); } /* malloc_with_check */ @@ -259,6 +265,7 @@ a catastrophe. result = (void*)malloc((true_size_t)size_t_arg(size)); #if DEBUG +/* GCOVR_EXCL_START */ /* Track total allocation. */ if (result != NULL) { /* Can't do this conditionally on db_active since db_active is not yet @@ -271,6 +278,7 @@ a catastrophe. (unsigned long)(num_bytes_allocated - num_bytes_freed)); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return result; } /* malloc_for_interpreter */ @@ -283,6 +291,7 @@ Free a block of the given size allocated by a call to malloc_for_interpreter. */ { #if DEBUG +/* GCOVR_EXCL_START */ /* Can't do this conditionally on db_active since db_active is not yet set when command line processing is done. */ adjust_record_of_total_allocation(-(long)size); @@ -290,6 +299,7 @@ Free a block of the given size allocated by a call to malloc_for_interpreter. fprintf(f_debug, "free_for_interpreter: freeing block of size %lu\n", (unsigned long)size); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ free((char*)block); } /* free_for_interpreter */ @@ -316,6 +326,7 @@ malloc_with_check. "old_size" is present to help with tracking of space used. catastrophe(ec_out_of_memory); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ /* Track total allocation. */ /* Can't do this conditionally on db_active since db_active is not yet set when command line processing is done. */ @@ -327,6 +338,7 @@ malloc_with_check. "old_size" is present to help with tracking of space used. (unsigned long)old_size, (unsigned long)(num_bytes_allocated - num_bytes_freed)); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ return (ptr); @@ -372,10 +384,12 @@ Add an entry to the memory allocation history array. mahp->addr = addr; mahp->size = size; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Added mem_alloc_history, addr: %p, size: %lu\n", addr, (unsigned long)size); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* add_mem_alloc_history_entry */ @@ -403,10 +417,12 @@ to cause the memory allocation history table to overflow. size_allocated += HOST_ALLOCATION_INCREMENT; add_mem_alloc_history_entry(ptr, HOST_ALLOCATION_INCREMENT); #if DEBUG +/* GCOVR_EXCL_START */ /* Track total allocation. */ /* Can't do this conditionally on db_active since db_active is not yet set when command line processing is done. */ adjust_record_of_total_allocation((long)HOST_ALLOCATION_INCREMENT); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* while */ } /* preallocate_pch_memory */ @@ -425,7 +441,9 @@ preallocated memory that has not been used. n < num_of_mem_alloc_history_entries; ++n) { (void)free(mem_alloc_history[n].addr); #if DEBUG +/* GCOVR_EXCL_START */ adjust_record_of_total_allocation(-(long)(mem_alloc_history[n].size)); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ /* Set the number of entries in existence to the number used so far. @@ -476,11 +494,13 @@ file are mapped into the address space of subsequent compilation. mem_alloc_history_entries_used = num_of_mem_alloc_history_entries; mmap_size_allocated += size; #if DEBUG +/* GCOVR_EXCL_START */ /* Record the total amount of allocated memory that was allocated via memory mapped files. */ num_mapped_bytes_allocated += (unsigned long)size; num_mapped_bytes_from_pch += (unsigned long)size; adjust_record_of_total_allocation((long)size); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* record_mapped_mem_block */ @@ -496,10 +516,12 @@ Unmap the memory blocks that have been mapped. sizeof_t size = mem_alloc_history[n].size; unmap_memory(mem_alloc_history[n].addr, size); #if DEBUG +/* GCOVR_EXCL_START */ /* Record the total amount of allocated memory that was allocated via memory mapped files. */ num_mapped_bytes_allocated -= (unsigned long)size; adjust_record_of_total_allocation(-(long)size); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ num_of_mem_alloc_history_entries = 0; @@ -562,6 +584,7 @@ PCH was created. number of entries that exist in mmap mode. */ mem_alloc_history_entries_used = num_of_mem_alloc_history_entries; #if DEBUG +/* GCOVR_EXCL_START */ /* Record the total amount of allocated memory that was allocated via memory mapped files. */ num_mapped_bytes_allocated += (unsigned long)size; @@ -570,6 +593,7 @@ PCH was created. fprintf(f_debug, "Allocated %lu bytes of mapped memory at %p\n", (unsigned long)size, addr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return addr; } /* alloc_new_mem_block */ @@ -662,7 +686,9 @@ a smaller-sized block. Return a pointer to the block header. the wasted space on the end of a previous block. */ if (reusable_blocks_list != NULL) { #if DEBUG +/* GCOVR_EXCL_START */ ++num_reclaim_attempts; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ needed_size = min_size + adjusted_header_size; for (prev_hdr = NULL, hdr = reusable_blocks_list; @@ -675,7 +701,9 @@ a smaller-sized block. Return a pointer to the block header. /*SUPPRESS 22*/ check_assertion(hdr->after_end_of_block >= hdr->start_of_block); #if DEBUG +/* GCOVR_EXCL_START */ ++num_reclaim_traversals; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ alloc_size = (sizeof_t)(hdr->after_end_of_block - hdr->start_of_block) + adjusted_header_size; @@ -699,11 +727,13 @@ a smaller-sized block. Return a pointer to the block header. prev_hdr_found->next = hdr_found->next; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "alloc_mem_block: reusing block, size = %lu\n", (unsigned long)alloc_size); } /* if */ ++num_reclaim_successes; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ hdr = hdr_found; goto have_hdr; @@ -786,6 +816,7 @@ Free a block that was allocated by malloc. */ { #if DEBUG +/* GCOVR_EXCL_START */ /* Can't do this conditionally on db_active since db_active is not yet set when command line processing is done. */ adjust_record_of_total_allocation(-((long)hdr->malloc_size)); @@ -793,6 +824,7 @@ Free a block that was allocated by malloc. fprintf(f_debug, "free_complete_block: freeing block of size %lu\n", (unsigned long)hdr->malloc_size); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ free((char *)hdr); } /* free_complete_block */ @@ -872,6 +904,7 @@ Free any unallocated space remaining in the indicated memory block. } /* trim_mem_block */ #if DEBUG +/* GCOVR_EXCL_START */ void track_allocation(a_memory_region_number region_number, sizeof_t size, @@ -890,6 +923,7 @@ purposes. allocated_in_region[region_number] += (unsigned long)size; } /* track_allocation */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void ensure_function_def_table_space(a_function_def_number function_def_number) @@ -990,6 +1024,7 @@ the number of entries indicated by region_number. #endif /* IL_SHOULD_BE_WRITTEN_TO_FILE */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ /* ... and also allocated_in_region. Note that this allocation might be out of sync with the others. */ /* Can't do this conditionally on db_active since db_active is not yet @@ -1007,6 +1042,7 @@ the number of entries indicated by region_number. sizeof(unsigned long))); size_of_allocated_in_region = size_of_mem_region_table; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* ensure_mem_region_table_space */ @@ -1057,9 +1093,11 @@ A new region is used for each function's executable code and data. } /* if */ region_number = ++highest_used_region_number; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 2) { fprintf(f_debug, "New memory region, number %ld.\n", (long)region_number); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ init_memory_region(region_number, (sizeof_t)0); @@ -1083,7 +1121,9 @@ free_general will be reclaimed upon mem_manage_wrapup. memory_allocation_map->map(ptr, size); #endif /* TRACK_GENERAL_ALLOCATION */ #if DEBUG +/* GCOVR_EXCL_START */ total_general_mem_allocated += (unsigned long)size; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return ptr; } /* alloc_general */ @@ -1108,7 +1148,9 @@ Free a tracked block of memory to general storage. #endif /* TRACK_GENERAL_ALLOCATION */ /* Update internal memory tracking. */ #if DEBUG +/* GCOVR_EXCL_START */ total_general_mem_allocated -= (unsigned long)size; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if TRACK_GENERAL_ALLOCATION memory_allocation_map->unmap(ptr); @@ -1174,8 +1216,10 @@ acts like alloc_resizable_buffer. #endif /* EXPENSIVE_CHECKING */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ total_general_mem_allocated -= (unsigned long)old_size; total_general_mem_allocated += (unsigned long)new_size; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return ptr; } /* realloc_buffer */ @@ -1193,11 +1237,13 @@ needed (e.g., it has been written out to the IL file). db_enter(5, "free_memory_region"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "free_memory_region: region %lu, size = %lu\n", (unsigned long)(unsigned)region_number, (unsigned long)allocated_in_region[region_number]); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if !STANDALONE_UTILITY_PROGRAM && EXPENSIVE_CHECKING /* Let the symbol table know the given memory region is being freed. */ @@ -1212,7 +1258,9 @@ needed (e.g., it has been written out to the IL file). mem_region_table[region_number] = NULL; il_header.region_scope_entry[region_number] = NULL; #if DEBUG +/* GCOVR_EXCL_START */ allocated_in_region[region_number] = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (region_number == file_scope_region_number) { /* The storage for local constants has been freed. */ @@ -1422,12 +1470,14 @@ memory or with an IL file. db_enter(5, "check_for_done_with_memory_region"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 1) { fprintf(f_debug, "check_for_done_with_memory_region: region %lu, size = %lu\n", (unsigned long)(unsigned)region_number, (unsigned long)allocated_in_region[region_number]); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if STANDALONE_UTILITY_PROGRAM /* In a standalone program the memory is always freed. */ @@ -1489,6 +1539,7 @@ memory or with an IL file. } /* for */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (rout != NULL && debug_level >= 2) { fprintf(f_debug, "check_for_done_with_memory_region: "); fprintf(f_debug, "%s memory region for ", @@ -1496,6 +1547,7 @@ memory or with an IL file. db_name(&rout->source_corresp); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!keep_memory) { /* Write the region to the file and free it. */ @@ -1553,6 +1605,7 @@ part of secondary translation units (perhaps). "check_for_done_with_all_function_memory_regions:", "trivial default constructor"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 2) { fprintf(f_debug, "check_for_done_with_all_function_memory_regions: "); @@ -1562,6 +1615,7 @@ part of secondary translation units (perhaps). db_name(&rout->source_corresp); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!from_secondary_trans_unit) write_memory_region(n); if (!skip_il_read) { @@ -1578,6 +1632,7 @@ part of secondary translation units (perhaps). #endif /* !STANDALONE_UTILITY_PROGRAM */ #if DEBUG +/* GCOVR_EXCL_START */ #if !STANDALONE_UTILITY_PROGRAM void show_mem_manage_space_used(unsigned long total_accounted_for) /* @@ -1666,6 +1721,7 @@ usage counts in other files. fprintf(f_debug, "%25s %26lu\n", "Max mem alloc", max_mem_allocated); } /* show_mem_manage_space_used */ #endif /* !STANDALONE_UTILITY_PROGRAM */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -1684,7 +1740,9 @@ they point to are allocated there. tbp->size = 0; tbp->buffer = alloc_resizable_buffer(allocation_increment); #if DEBUG +/* GCOVR_EXCL_START */ num_text_buffers_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return tbp; } /* alloc_text_buffer */ @@ -1878,6 +1936,7 @@ specified size. The block is recorded for possible reuse later by alloc_fe. } /* namespace detail */ #if DEBUG +/* GCOVR_EXCL_START */ void db_text_buffer(a_const_char *prefix, a_text_buffer_ptr buf) @@ -1966,6 +2025,7 @@ prefix field.) return &il_entry_prefix_of(entry); } /* db_prefix_ptr */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if EXPENSIVE_CHECKING @@ -2000,9 +2060,11 @@ Do one-time initialization of variables related to the mem_manage routines. therefore doesn't need to be saved here. */ pch_saved_var_array_elem(reusable_blocks_list), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(total_mem_used), pch_saved_var_array_elem(num_alignment_bytes_allocated), pch_saved_var_array_elem(num_text_buffers_allocated), +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pch_saved_var_array_terminating_elem() }; @@ -2027,6 +2089,7 @@ Do one-time initialization of variables related to the mem_manage routines. register_trans_unit_variable(file_scope_region_number); #endif /* !STANDALONE_UTILITY_PROGRAM */ #if DEBUG +/* GCOVR_EXCL_START */ allocated_in_region = NULL; size_of_allocated_in_region = 0; num_text_buffers_allocated = 0; @@ -2034,6 +2097,7 @@ Do one-time initialization of variables related to the mem_manage routines. num_mapped_bytes_allocated = 0; num_mapped_bytes_from_pch = 0; #endif /* USE_MMAP_FOR_MEMORY_REGIONS */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #ifdef USING_PURIFY /* Call the Purify runtime routine to determine whether this executable @@ -2049,6 +2113,7 @@ Do one-time initialization of variables related to the mem_manage routines. } /* mem_manage_one_time_init */ #if DEBUG +/* GCOVR_EXCL_START */ void mem_manage_one_time_init_done() /* @@ -2059,6 +2124,7 @@ amount of memory that was in use after the initialization phase. mem_in_use_after_one_time_init = (num_bytes_allocated - num_bytes_freed); } /* mem_manage_one_time_init_done */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void mem_manage_trans_unit_init(void) @@ -2081,6 +2147,7 @@ must be initialized for each translation unit. } /* mem_manage_trans_unit_init */ #if DEBUG +/* GCOVR_EXCL_START */ void mem_manage_trans_unit_init_done() /* @@ -2099,6 +2166,7 @@ any translation unit. } /* if */ } /* mem_manage_trans_unit_init_done */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void mem_manage_early_init(void) @@ -2125,6 +2193,7 @@ This is done before command line processing. size_of_mem_region_table = 0; size_of_function_def_table = 0; #if DEBUG +/* GCOVR_EXCL_START */ max_mem_allocated = 0; mem_in_use_after_one_time_init = 0; max_mem_in_use_after_tu_init = 0; @@ -2136,6 +2205,7 @@ This is done before command line processing. num_free_calls = 0; num_bytes_freed = 0; total_general_mem_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* mem_manage_early_init */ @@ -2163,8 +2233,10 @@ must be initialized for each compilation. file_scope_region_number = FILE_SCOPE_REGION_NUMBER; highest_used_function_def_number = NULL_function_def_number; #if DEBUG +/* GCOVR_EXCL_START */ total_mem_used = 0; num_alignment_bytes_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if MAINTAIN_ALLOCATION_SEQUENCE_NUMBER allocation_sequence_number_seed = 0; diff --git a/src/mem_manage.h b/src/mem_manage.h index 98cfdcacd7..55eb247a7d 100644 --- a/src/mem_manage.h +++ b/src/mem_manage.h @@ -117,9 +117,11 @@ extern a_mem_block_header_ptr alloc_mem_block( extern void trim_mem_block(a_mem_block_header_ptr hdr); #if DEBUG +/* GCOVR_EXCL_START */ extern void track_allocation(a_memory_region_number region_number, sizeof_t size, sizeof_t orig_size); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if !STANDALONE_UTILITY_PROGRAM @@ -146,7 +148,9 @@ is used for allocation of general front end memory (i.e., not IL). size = max_val(size, (sizeof_t)1); #if DEBUG +/* GCOVR_EXCL_START */ sizeof_t orig_size = size; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Round up the size if necessary to preserve alignment. Note that aside from keeping the data correctly aligned, this also keeps the @@ -232,7 +236,9 @@ is used for allocation of general front end memory (i.e., not IL). hdr->next_avail_in_block = hdr->after_end_of_block; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ track_allocation(region_number, size, orig_size); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if !STANDALONE_UTILITY_PROGRAM #ifdef TRACE_ALLOC @@ -503,8 +509,10 @@ extern void free_all_memory_regions(void); /* Free the unused space in the final block of a memory region. */ extern void trim_memory_region(a_memory_region_number region_number); #if DEBUG +/* GCOVR_EXCL_START */ /* Display the amount of memory used, for debug purposes. */ extern void show_mem_manage_space_used(unsigned long total_accounted_for); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Early initialization of memory management routines. */ extern void mem_manage_early_init(void); @@ -515,9 +523,11 @@ extern void mem_manage_trans_unit_init(void); extern void mem_manage_reset(void); extern void mem_manage_init(void); #if DEBUG +/* GCOVR_EXCL_START */ /* Functions for tracking important high water marks. */ extern void mem_manage_one_time_init_done(); extern void mem_manage_trans_unit_init_done(); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if MAKE_FRONT_END_CALLABLE @@ -634,6 +644,7 @@ Macro that is TRUE if two memory allocation history entries are equivalent. #endif /* !STANDALONE_UTILITY_PROGRAM */ #if DEBUG +/* GCOVR_EXCL_START */ EXTERN_THREAD unsigned long *allocated_in_region; /* Parallel array to mem_region_table. Keeps track @@ -642,6 +653,7 @@ EXTERN_THREAD a_memory_region_number size_of_allocated_in_region; /* Size of allocated_in_region (in entries, not bytes). */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* @@ -779,12 +791,14 @@ Add the specified character to the text buffer specifier by "buf". } /* add_char_to_text_buffer */ #if DEBUG +/* GCOVR_EXCL_START */ extern void db_text_buffer(a_const_char *prefix, a_text_buffer_ptr buf); extern void db_prefix(void *entry_ptr); extern an_il_entry_prefix_ptr db_prefix_ptr(char *entry); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* @@ -869,8 +883,10 @@ enum a_function_number : a_byte { fn_test_next_construct_pragma, #endif /* INCLUDE_EDG_TEST_PRAGMAS */ #if DEBUG +/* GCOVR_EXCL_START */ fn_db_opt_pragma, fn_db_name_pragma, +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if NEED_IL_DISPLAY fn_pragma_il_display, diff --git a/src/modules.c b/src/modules.c index 82422ab3f1..e0c238fbe4 100644 --- a/src/modules.c +++ b/src/modules.c @@ -636,6 +636,7 @@ processing has ended. entities available. */ check_assertion(deferred_entries != NULL); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_symbols")) { a_string dbg_msg("Symbol load started (depth = ", deferred_entries->num_active_scopes, @@ -645,6 +646,7 @@ processing has ended. db_scope(scope); (void)fputs("\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ++deferred_entries->num_active_scopes; for (size_t i = 0; i < deferred_entries->entries.length(); ++i) { @@ -655,11 +657,13 @@ processing has ended. continue; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_symbols")) { (void)fprintf(f_debug, "Symbol load of \"%s\" in ", sym_hdr->identifier); db_scope(scope); (void)fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ++deferred_entries->num_processed; entry.scope = NULL; @@ -671,6 +675,7 @@ processing has ended. (void)request_entity(mep); } /* for */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_symbols")) { a_string dbg_msg("Symbol load finished (depth = ", deferred_entries->num_active_scopes, @@ -680,6 +685,7 @@ processing has ended. db_scope(scope); (void)fputs("\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (--deferred_entries->num_active_scopes == 0) { size_t total_num_entries = deferred_entries->entries.length(); @@ -687,17 +693,20 @@ processing has ended. if (deferred_entries->num_processed == total_num_entries) { /* Free the entire list as it's now unused. */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_symbols")) { a_string dbg_msg("Symbol loading completed for \"", sym_hdr->identifier, "\""); print(dbg_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ delete_fe(&sym_hdr->deferred_module_entries); } else if (deferred_entries->num_processed > 0) { /* Clean up any entries that match the current scope. */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ifc_symbols")) { a_string dbg_msg("Symbol loading partially completed for \"", sym_hdr->identifier, "\" (", @@ -706,6 +715,7 @@ processing has ended. print(dbg_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ auto has_been_processed = [](const a_deferred_module_entry &entry) -> a_boolean { @@ -2025,6 +2035,7 @@ module implementation about the new information. { mep->locators.push_back(new_loc); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("module_entity_locator") && mep->locators.length() > 1) { a_string dbg_msg("Entity identified by multiple locators: "); a_boolean first = TRUE; @@ -2038,6 +2049,7 @@ module implementation about the new information. } /* for */ print(dbg_msg, f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (mep->entity.ptr != NULL) { /* Notify the appropriate module implementation. */ @@ -2155,6 +2167,7 @@ module output file. #if DEBUG +/* GCOVR_EXCL_START */ void db_mep_stack() /* @@ -2327,6 +2340,7 @@ Display debug information about a module entity. } /* if */ } /* db_mep */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void modules_pch_reset() @@ -2356,12 +2370,14 @@ This is done before command line processing. */ { #if DEBUG +/* GCOVR_EXCL_START */ /* These are initialized per-translation unit. However, in case of a command line error these must be reinitialized to prevent -d-module_report from reporting "declarations processed" by the previous front end invocation. */ num_module_decls_attempted = 0; num_module_decls_failed = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* modules_early_init */ @@ -2400,8 +2416,10 @@ Do one-time initialization of static variables defined in this file. /* Register variables that have distinct copies for distinct translation units. */ #if DEBUG +/* GCOVR_EXCL_START */ register_trans_unit_variable(num_module_decls_attempted); register_trans_unit_variable(num_module_decls_failed); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ register_trans_unit_variable(curr_module_sym); register_trans_unit_variable(lazy_symbols_may_be_visible); @@ -2449,8 +2467,10 @@ translation unit. */ { #if DEBUG +/* GCOVR_EXCL_START */ num_module_decls_attempted = 0; num_module_decls_failed = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ curr_module_sym = NULL; lazy_symbols_may_be_visible = FALSE; diff --git a/src/modules.h b/src/modules.h index 4682bc492c..b9ad348433 100644 --- a/src/modules.h +++ b/src/modules.h @@ -90,6 +90,7 @@ struct a_module_entity { }; /* a_module_entity */ #if DEBUG +/* GCOVR_EXCL_START */ EXTERN_THREAD unsigned long num_module_decls_attempted; @@ -101,6 +102,7 @@ EXTERN_THREAD unsigned long /* The number of declarations that process_ifc_decl attempted to process, but marked invalid. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ inline a_boolean is_module_entity_globally_visible(a_module_entity_ptr mep) @@ -602,10 +604,12 @@ Cleanup after the token cache. */ { #if DEBUG +/* GCOVR_EXCL_START */ if (!this->valid && db_flag_is_set("invalid_token_cache")) { fprintf(f_debug, "Discarded invalid module cache:\n"); db_tokens(&(this->underlying_cache)); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* a_module_token_cache::~a_module_token_cache() */ @@ -840,6 +844,7 @@ extern a_shared_token_cache get_field_initializer_for_module_write( a_field_ptr fp); #if DEBUG +/* GCOVR_EXCL_START */ extern void db_tokens(a_module_token_cache_ptr cache); @@ -865,6 +870,7 @@ extern void db_module_stack(); extern void db_mep_stack(); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ extern void modules_pch_reset(); diff --git a/src/ms_attrib.c b/src/ms_attrib.c index c5954ed64f..6a8917734e 100644 --- a/src/ms_attrib.c +++ b/src/ms_attrib.c @@ -33,12 +33,14 @@ BEGIN_EDG_NAMESPACE #if DEBUG +/* GCOVR_EXCL_START */ /* Counts of tables allocated, to track total use of memory. */ STATIC_THREAD unsigned long num_ms_attribute_kind_descrs_allocated, num_ms_attribute_params_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ STATIC_THREAD a_text_buffer_ptr @@ -188,7 +190,9 @@ return a pointer to the entry. msakdp = alloc_fe_of_type(an_ms_attribute_kind_descr); #if DEBUG +/* GCOVR_EXCL_START */ num_ms_attribute_kind_descrs_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ msakdp->kind = (an_ms_attribute_kind)msak_none; msakdp->target = msat_invalid; @@ -246,7 +250,9 @@ return a pointer to the entry. msapp = alloc_fe_of_type(an_ms_attribute_param); #if DEBUG +/* GCOVR_EXCL_START */ num_ms_attribute_params_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ msapp->next = NULL; msapp->name = NULL; @@ -2403,9 +2409,11 @@ attributes). attr->variant.info.string = make_copy_of_token_string(); } /* if */ #if DEBUG + /* GCOVR_EXCL_START */ if (db_flag_is_set("msattr")) { if (attr != NULL) db_microsoft_attribute(attr); } /* if */ + /* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -2896,11 +2904,13 @@ no attribute can be applied to the entity. msap->variant.info.name); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("msattr")) { fprintf(f_debug, "Attribute target: valid=%x, applicable=%x\n", (unsigned int)valid_targets, (unsigned int)applicable_targets); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -3331,6 +3341,7 @@ return NULL. } /* find_ms_attribute_for_entity */ #if DEBUG +/* GCOVR_EXCL_START */ void db_microsoft_attribute(an_ms_attribute_ptr msap) /* @@ -3441,6 +3452,7 @@ routines is reported as part of the symbol table memory used. return grand_total; } /* db_show_ms_attrib_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void ms_attrib_one_time_init(void) @@ -3456,8 +3468,10 @@ One-time initialization for ms_attrib.c static variables. pch_saved_var_array_elem(unrecognized_attribute), pch_saved_var_array_elem(custom_attribute), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_ms_attribute_kind_descrs_allocated), pch_saved_var_array_elem(num_ms_attribute_params_allocated), +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pch_saved_var_array_terminating_elem() }; @@ -3479,8 +3493,10 @@ Microsoft attribute processing. unrecognized_attribute = NULL; custom_attribute = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_ms_attribute_kind_descrs_allocated = 0; num_ms_attribute_params_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ memzero((char *)attribute_lookup_table, sizeof(attribute_lookup_table)); curr_attribute_descr = NULL; diff --git a/src/ms_attrib.h b/src/ms_attrib.h index d0f609fd83..40804f457c 100644 --- a/src/ms_attrib.h +++ b/src/ms_attrib.h @@ -135,8 +135,10 @@ extern void ms_attrib_one_time_init(void); extern void ms_attrib_init(void); #if DEBUG +/* GCOVR_EXCL_START */ extern void db_microsoft_attribute(an_ms_attribute_ptr msap); extern unsigned long db_show_ms_attrib_space_used(unsigned long grand_total); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ EXTERN_THREAD a_boolean diff --git a/src/overload.c b/src/overload.c index 866e72bb56..fabd378265 100644 --- a/src/overload.c +++ b/src/overload.c @@ -76,6 +76,7 @@ static a_boolean check_narrowing_conversion(an_operand *source_operand, #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long n_viability_checks = 0, n_viability_failures = 0, @@ -114,6 +115,7 @@ Display some statistics regarding calls to determine_function_viability. n_deduced_substitition_lookup_failures); } /* db_viability_stats */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -258,6 +260,7 @@ has a corresponding earlier entry. } /* in_substitution_loop */ #if DEBUG +/* GCOVR_EXCL_START */ void db_substitution_stack(void) /* @@ -274,6 +277,7 @@ Output a log of the current substitution stack. } /* for */ } /* db_substitution_stack */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ using a_small_ovl_res_stack_stack = @@ -1267,6 +1271,7 @@ destination type (this comes up in a Microsoft-mode extension). } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { if (match_sym == NULL) { fprintf(f_debug, "find_addr_of_overloaded_function_match: %s\n", @@ -1275,6 +1280,7 @@ destination type (this comes up in a Microsoft-mode extension). db_symbol(match_sym, "find_addr_of_overloaded_function_match: ", 2); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return match_sym; @@ -1560,7 +1566,9 @@ Such entries are used in resolving calls to overloaded functions. /* Allocate a new entry. */ amsp = (an_arg_match_summary_ptr)alloc_fe(sizeof(an_arg_match_summary)); #if DEBUG +/* GCOVR_EXCL_START */ num_arg_match_summaries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ clear_arg_match_summary(amsp); @@ -1584,6 +1592,7 @@ Free the list of argument match summary entries pointed to by amsp. } /* free_arg_match_summary_list */ #if DEBUG +/* GCOVR_EXCL_START */ static void db_arg_match_summary(an_arg_match_summary_ptr amsp) /* @@ -1651,6 +1660,7 @@ Print an argument match summary for debug purposes. fprintf(f_debug, "\n"); } /* db_arg_match_summary */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static a_candidate_function_ptr alloc_candidate_function(void) @@ -1669,7 +1679,9 @@ are used in resolving calls to overloaded functions. /* Allocate a new entry. */ cfp = (a_candidate_function_ptr)alloc_fe(sizeof(a_candidate_function)); #if DEBUG +/* GCOVR_EXCL_START */ num_candidate_functions_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ clear_candidate_function(cfp); @@ -1699,6 +1711,7 @@ Free the list of candidate function entries pointed to by cfp. } /* free_candidate_function_list */ #if DEBUG +/* GCOVR_EXCL_START */ static void db_candidate_function(a_candidate_function_ptr cfp) /* @@ -1756,8 +1769,10 @@ Print a candidate function entry for debugging purposes. } /* for */ } /* db_candidate_function */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if DEBUG +/* GCOVR_EXCL_START */ static void db_candidate_function_list(a_candidate_function_ptr cfp_list) /* @@ -1779,6 +1794,7 @@ Print a candidate function entry list for debugging purposes. } /* if */ } /* db_candidate_function_list */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static void add_function_to_candidate_functions_list( @@ -1807,10 +1823,12 @@ formal parameters. candidate->next = *candidate_functions; *candidate_functions = candidate; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "add_function_to_candidate_functions_list: added\n"); db_candidate_function(candidate); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* add_function_to_candidate_functions_list */ @@ -1835,11 +1853,13 @@ have match the function's formal parameters. candidate->next = *candidate_functions; *candidate_functions = candidate; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "add_surrogate_function_to_candidate_functions_list: added\n"); db_candidate_function(candidate); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* add_surrogate_function_to_candidate_functions_list */ @@ -1867,11 +1887,13 @@ types. candidate->next = *candidate_functions; *candidate_functions = candidate; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "add_builtin_operator_to_candidate_functions_list: added\n"); db_candidate_function(candidate); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* add_builtin_operator_to_candidate_functions_list */ @@ -1912,11 +1934,13 @@ function's formal parameters. candidate->next = *candidate_functions; *candidate_functions = candidate; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "add_function_template_to_candidate_functions_list: added\n"); db_candidate_function(candidate); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* add_function_template_to_candidate_functions_list */ @@ -2888,6 +2912,7 @@ constructor. Record in *arg_summary the selected constructor. } /* arg_copy_can_be_done_via_constructor */ #if DEBUG +/* GCOVR_EXCL_START */ static void db_display_overload_level(void) /* @@ -2901,6 +2926,7 @@ of a line of debug output. (int)ovl_res_stack()->emit_note_diagnostics()); } /* db_display_overload_level */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static a_boolean binding_rvalue_ref_to_lvalue_allowed( @@ -3063,6 +3089,7 @@ copy-initialization). db_enter(4, "determine_arg_match_level"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "Entering determine_arg_match_level, param_type = "); @@ -3076,6 +3103,7 @@ copy-initialization). } /* if */ fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (allow_expl_conv_funcs) conv_context |= CCO_ALLOW_EXPLICIT_CONV_FUNCTIONS; param_is_reference = is_any_reference_type(param_type); @@ -3876,6 +3904,7 @@ have_level:; } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); if (arg_summary->match_level == aml_none) { @@ -3885,6 +3914,7 @@ have_level:; db_arg_match_summary(arg_summary); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* determine_arg_match_level */ @@ -5053,10 +5083,12 @@ deduction failed. ctws_options, (a_type_ptr)NULL); #if DEBUG +/* GCOVR_EXCL_START */ n_deduced_substitition_lookups += 1; if (updated_routine_type == NULL) { n_deduced_substitition_lookup_failures += 1; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ if (updated_routine_type == NULL) { @@ -5565,10 +5597,12 @@ match. goto done; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "arg_count_mismatch: default arg match\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ if (designator_seen) { @@ -5946,7 +5980,9 @@ in a new-expression). goto reject_function; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ n_viability_checks += 1; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (routine_type == NULL) { function_symbol = fundamental_symbol_of(proj_function_symbol); @@ -5994,6 +6030,7 @@ in a new-expression). /* We've consumed the selector at this point. */ have_selector = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "determine_function_viability: consume selector for" @@ -6001,6 +6038,7 @@ in a new-expression). db_abbreviated_type(this_object->variant.expr.arg_op->operand.type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -6134,7 +6172,9 @@ in a new-expression). ctws_options |= CTWS_MAY_BE_RESCANNED; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ n_explicit_arg_viability_checks += 1; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (notes != NULL) { an_ovl_res_descr_ptr descr = ovl_stack->top(); @@ -6149,7 +6189,9 @@ in a new-expression). /* Bail out if there is a mismatch. */ if (routine_type == NULL) { #if DEBUG +/* GCOVR_EXCL_START */ n_explicit_arg_viability_failures += 1; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (notes != NULL) { if (!ovl_stack->top()->constraint_failure) { @@ -6324,12 +6366,14 @@ in a new-expression). (arg_list_elem == arg_list)); narg++; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "determine_function_viability: arg %d", narg); if (!first_pass) fprintf(f_debug, " (pass 2)"); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ while (is_designator_component(arg_list_elem)) { arg_list_elem = next_elem(arg_list_elem); @@ -6357,10 +6401,12 @@ in a new-expression). desirability. */ arg_match->match_level = aml_ellipsis; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "determine_function_viability: ellipsis match\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else if (function_template_case && (param_before_deduction == NULL || @@ -6627,7 +6673,9 @@ in a new-expression). arg_match = arg_match_list; /* Do template argument deduction on the parameter types. */ #if DEBUG +/* GCOVR_EXCL_START */ n_deduction_viability_checks += 1; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ routine_type = function_template_call_argument_deduction( function_symbol, @@ -6639,7 +6687,9 @@ in a new-expression). if (routine_type == NULL) { /* Deduction failed. */ #if DEBUG +/* GCOVR_EXCL_START */ n_deduction_viability_failures += 1; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (notes != NULL) { if (!ovl_stack->top()->constraint_failure) { @@ -6965,7 +7015,9 @@ in a new-expression). } /* if */ /* The function is not suitable. */ #if DEBUG +/* GCOVR_EXCL_START */ n_viability_failures += 1; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Free any argument match summary entries built for it. */ free_arg_match_summary_list(arg_match_list); @@ -7211,11 +7263,13 @@ context of the conversion. a_boolean eff_allow_udc_on_arguments = allow_udc_on_arguments; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); db_symbol(proj_function_symbol, "try_overloaded_function_match: considering ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ function_symbol = fundamental_symbol_of(proj_function_symbol); if (ignore_templates && symbol_is(function_symbol, sk_function_template)) { @@ -7567,11 +7621,13 @@ hide-by-sig lookup. surrogate_function_conv_sym = next_symbol_in_overload_symbol_list(&ostblock)) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); db_symbol(surrogate_function_conv_sym, "try_surrogate_function_match: considering ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ base_surrogate_function_conv_sym = fundamental_symbol_of(surrogate_function_conv_sym); @@ -10236,11 +10292,13 @@ is set to TRUE. db_enter(4, "select_best_candidate_functions"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "Entry to select_best_candidate_functions: "); db_candidate_function_list(candidates); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ *undecidable_because_of_error = FALSE; *ambiguous = FALSE; @@ -10620,11 +10678,13 @@ end_func_winnow:; } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "Return from select_best_candidate_functions: "); db_candidate_function_list(candidates); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* select_best_candidate_functions */ @@ -11349,11 +11409,13 @@ This routine is called only in C++ mode. db_enter(4, "select_overloaded_function"); ovl_res_stack()->push(); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); db_symbol(overloaded_function_symbol, "Entering select_overloaded_function with ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (unknown_dependent_function != NULL) *unknown_dependent_function = FALSE; if (found_through_adl != NULL) *found_through_adl = FALSE; @@ -11888,9 +11950,11 @@ This routine is called only in C++ mode. } else if (ambiguous) { /* More than one function applies and is a best match -- ambiguity. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { db_candidate_function_list(candidate_functions); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (candidate_functions->next == NULL && candidate_functions->function_symbol != NULL && @@ -11967,19 +12031,23 @@ This routine is called only in C++ mode. *surrogate_function_conv_sym = candidate_functions->surrogate_function_conv_sym; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); db_symbol(*surrogate_function_conv_sym, "select_overloaded_function: selected surrogate ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); db_symbol(function_symbol, "select_overloaded_function: selected ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -11991,11 +12059,13 @@ This routine is called only in C++ mode. overload -- redo the overload processing, this time adding additional notes that should help with diagnosing the issue. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); db_symbol(overloaded_function_symbol, "Reprocessing overload symbol for additional notes ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ goto reprocess_with_notes; } else if (dp != NULL) { @@ -12038,11 +12108,13 @@ This routine is called only in C++ mode. ->any_function_referenced_in_dependent_call = TRUE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); db_symbol(function_symbol, "Leaving select_overloaded_function, function_symbol = ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ovl_res_stack()->pop(); db_exit(); @@ -16321,11 +16393,13 @@ ultimate binding is to an rvalue reference . if (conversion_symbol == NULL) break; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); db_symbol(conversion_symbol, "try_conversion_function_match_full: considering ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Set template_arg_list early so that, on goto to reject_function, we know what has to be freed. */ @@ -17938,11 +18012,13 @@ the target type to be used). /* This routine is similar to try_overloaded_function_match (but it only looks at one type pattern per call). */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "try_builtin_operands_match: considering %s\n", operand_type_pattern); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ arg_match_list = end_arg_match_list = NULL; need_lvalue_result = first_operand_must_be_lvalue; @@ -17961,10 +18037,12 @@ the target type to be used). #endif /* CHECKING */ narg++; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "try_builtin_operands_match: operand %d\n", narg); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Because braced-init-lists are not allowed as operands of operators, the entry here must be for an expression. */ @@ -20271,10 +20349,12 @@ selected, it is stored in *rewritten_candidate. ovl_stack->push(); ovl_stack->top()->in_comparison_rewrite = in_comparison_rewrite; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "Entering check_for_operator_overloading\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ *processed = FALSE; if (p_none_viable != NULL) *p_none_viable = FALSE; @@ -20570,9 +20650,11 @@ selected, it is stored in *rewritten_candidate. ambiguity. */ *processed = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { db_candidate_function_list(candidate_functions); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (expr_error_should_be_issued()) { dp = pos_st_start_error(ec_ambiguous_operator_function, @@ -20618,11 +20700,13 @@ selected, it is stored in *rewritten_candidate. a_boolean op_1_inside_conditional = FALSE, op_2_inside_conditional = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "check_for_operator_overloading: selected\n"); db_candidate_function(candidate_functions); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* *processed is left FALSE so the caller will try the built-in meaning. */ @@ -20654,11 +20738,13 @@ selected, it is stored in *rewritten_candidate. a_boolean bitwise_assignment = FALSE, have_selector; a_type_ptr routine_type; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); db_symbol(proj_function_symbol, "check_for_operator_overloading: selected ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ *processed = TRUE; function_symbol = fundamental_symbol_of(proj_function_symbol); @@ -20696,11 +20782,13 @@ selected, it is stored in *rewritten_candidate. operator, so generate an assignment instead of a call. */ a_boolean access_error_reported; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "check_for_operator_overloading: bitwise operator=\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_assertion(nonstatic_member_is_best_match); bitwise_assignment = TRUE; @@ -20978,11 +21066,13 @@ selected, it is stored in *rewritten_candidate. overload -- redo the overload processing, this time adding additional notes that should help with diagnosing the issue. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "Reprocessing operator overload for additional notes\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ goto reprocess_with_notes; } /* if */ @@ -21004,10 +21094,12 @@ selected, it is stored in *rewritten_candidate. dp = NULL; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "Leaving f_check_for_operator_overloading\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ovl_res_stack()->pop(); db_exit(); @@ -21088,12 +21180,14 @@ error. conv_context describes the context of the conversion. db_enter(4, "conversion_to_class_possible"); ovl_res_stack()->push(); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "Entering conversion_to_class_possible, dest_type = "); db_abbreviated_type(dest_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ *ambiguous = FALSE; okay = FALSE; @@ -21455,9 +21549,11 @@ error. conv_context describes the context of the conversion. /* More than one constructor or conversion function matches at the same level. Ambiguity. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { db_candidate_function_list(candidate_functions); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else if (expr_access_checking_should_be_done() && candidate_functions->function_symbol != NULL && @@ -21513,11 +21609,13 @@ error. conv_context describes the context of the conversion. clear_conv_descr(ctor_arg_conversion); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "Leaving conversion_to_class_possible: %s\n", okay ? "okay" : "not okay"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ovl_res_stack()->pop(); db_exit(); @@ -21574,12 +21672,14 @@ conv_context describes the context of the conversion. */ db_enter(4, "conversion_from_class_possible"); ovl_res_stack()->push(); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "Entering conversion_from_class_possible, dest_type = "); db_abbreviated_type(dest_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ clear_conv_descr(conversion); if (is_template_dependent_context() && @@ -21655,9 +21755,11 @@ conv_context describes the context of the conversion. */ } else if (*ambiguous) { /* There are several equally desirable functions. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { db_candidate_function_list(candidate_functions); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { /* There is exactly one best conversion function. */ @@ -21676,11 +21778,13 @@ conv_context describes the context of the conversion. */ } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "Leaving conversion_from_class_possible: %s\n", okay ? "okay" : "not okay"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ovl_res_stack()->pop(); db_exit(); @@ -21828,6 +21932,7 @@ describes the context of the conversion. clear_conv_descr(conversion); ovl_res_stack()->push(); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, @@ -21839,6 +21944,7 @@ describes the context of the conversion. } /* if */ fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_assertion(dest_type == NULL || !is_any_reference_type(dest_type)); if (is_handle_type(source_type) || @@ -21913,9 +22019,11 @@ describes the context of the conversion. } else if (*ambiguous) { /* There are several equally desirable functions. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { db_candidate_function_list(candidate_functions); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { /* There is exactly one best conversion function. */ @@ -21935,12 +22043,14 @@ describes the context of the conversion. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, "Leaving cli_handle_user_defined_conversion_possible: %s\n", okay ? "okay" : "not okay"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ovl_res_stack()->pop(); } /* if */ @@ -22691,9 +22801,11 @@ conversion. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "conversion_possible: %s\n", okay ? "okay" : "not okay"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return okay; @@ -29716,6 +29828,7 @@ find_default_constructor. db_enter(4, "select_overloaded_default_constructor"); ovl_res_stack()->push(); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, @@ -29723,6 +29836,7 @@ find_default_constructor. db_abbreviated_type(class_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ *ambiguous = FALSE; class_type = skip_typerefs(class_type); @@ -29814,11 +29928,13 @@ find_default_constructor. free_candidate_function_list(candidate_functions); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); db_symbol(ctor_sym, "Leaving select_overloaded_default_constructor, ctor_sym = ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ovl_res_stack()->pop(); db_exit(); @@ -30027,6 +30143,7 @@ C++ mode. It does not do access checking on the copy constructor. db_enter(4, "select_overloaded_copy_constructor"); ovl_res_stack()->push(); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, @@ -30034,6 +30151,7 @@ C++ mode. It does not do access checking on the copy constructor. db_abbreviated_type(class_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (uncallable != NULL) *uncallable = FALSE; *class_bitwise_copy = FALSE; @@ -30167,10 +30285,12 @@ C++ mode. It does not do access checking on the copy constructor. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); db_symbol(sym, "select_overloaded_copy_constructor: considering ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ arg_match = alloc_arg_match_summary(); /* See if the argument type matches the parameter of the constructor. */ @@ -30284,11 +30404,13 @@ next_function:; } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); db_symbol(cctor_sym, "Leaving select_overloaded_copy_constructor, cctor_sym = ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ovl_res_stack()->pop(); db_exit(); @@ -30342,6 +30464,7 @@ assignment operator. db_enter(4, "select_overloaded_assignment_operator"); ovl_res_stack()->push(); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); fprintf(f_debug, @@ -30349,6 +30472,7 @@ assignment operator. db_abbreviated_type(class_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ *ambiguous = FALSE; *undecidable_because_of_error = FALSE; @@ -30424,11 +30548,13 @@ assignment operator. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); db_symbol(sym, "select_overloaded_assignment_operator: considering ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ selector_match = alloc_arg_match_summary(); arg_match = alloc_arg_match_summary(); @@ -30547,12 +30673,14 @@ next_function:; free_candidate_function_list(candidate_functions); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("overload")) { db_display_overload_level(); db_symbol(assign_sym, "Leaving select_overloaded_assignment_operator, assign_sym = ", 4); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ovl_res_stack()->pop(); db_exit(); @@ -30881,6 +31009,7 @@ appropriate, produce the "aggregate deduction candidate" (see N4885 definition. Use the resulting parameter list to create a deduction guide template. */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ctad")) { fprintf(f_debug, "\nParameters for aggregate deduction candidate:" " (line %d, column %d)\n" @@ -30889,6 +31018,7 @@ appropriate, produce the "aggregate deduction candidate" (see N4885 db_param_type_list(param_list); fprintf(f_debug, ")\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Attempt to create the aggregate deduction candidate. If one is created, it is also added to the deduction guide overload set. */ @@ -31387,7 +31517,9 @@ These are initializations that must be redone for each compilation. avail_candidate_functions = NULL; avail_arg_match_summaries = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_candidate_functions_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ substitution_stack = NULL; avail_substitution_stack_entries = NULL; diff --git a/src/overload.h b/src/overload.h index 21eac219df..641a446782 100644 --- a/src/overload.h +++ b/src/overload.h @@ -790,11 +790,13 @@ is that the caller is about to record that note). #if DEBUG +/* GCOVR_EXCL_START */ /* Counts of entries allocated, for debugging purposes. */ EXTERN_THREAD unsigned long num_candidate_functions_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -1524,9 +1526,11 @@ extern an_expr_node_ptr convert_arg_list_to_expr_list( #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ extern void db_substitution_stack(void); extern void db_viability_stats(void); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Conditionally close the "edg" namespace. */ diff --git a/src/pch.c b/src/pch.c index 5198a5aae0..fe379a735a 100644 --- a/src/pch.c +++ b/src/pch.c @@ -230,8 +230,10 @@ Macro to do an fseek on the output file with an error check. #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_pch_events_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -281,6 +283,7 @@ enum a_pch_file_section { }; #if DEBUG +/* GCOVR_EXCL_START */ static a_const_char *file_section_names[(int)pfs_last + 1] = { @@ -292,6 +295,7 @@ static a_const_char "memory_regions", "last" }; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -315,6 +319,7 @@ value passed by the caller. /* coverity[+taint_source: arg-0] */ /* coverity[string_null_argument] */ pch_read_value(section_in_file); #if DEBUG +/* GCOVR_EXCL_START */ if (section_in_file != section) { fprintf(f_debug, "Incorrect file section ID: expected %d, got %d\n", (int)section, (int)section_in_file); @@ -322,6 +327,7 @@ value passed by the caller. file_section_names[(int)section], file_section_names[(int)section_in_file]); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_assertion_str2(section_in_file == section, "check_file_section_id:", @@ -486,7 +492,9 @@ Allocate and initialize a precompiled header event record. /* Allocate a new entry. */ pep = (a_pch_event_ptr)alloc_general(sizeof(a_pch_event)); #if DEBUG +/* GCOVR_EXCL_START */ num_pch_events_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pep->next = NULL; pep->kind = kind; @@ -539,12 +547,14 @@ file. if (pch_event_list_tail != NULL) pch_event_list_tail->next = pep; pch_event_list_tail = pep; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("pch_event")) { fprintf(f_debug, "Added PCH event: %s, value=%s, line %lu, col %d\n", pch_event_kind_names[(int)pep->kind], pep->value == NULL ? "(NULL)" : pep->value, (unsigned long)pep->position.seq, pep->position.column); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* add_pch_event */ @@ -584,17 +594,20 @@ the command line. } /* if */ pch_cmd_line_event_list_tail = pep; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Added PCH event: %s, value=%s\n", pch_event_kind_names[(int)pep->kind], pep->value == NULL ? "(NULL)" : pep->value); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* add_command_line_pch_event */ #if DEBUG +/* GCOVR_EXCL_START */ static void db_pch_event(a_pch_event_ptr pep) /* Display a PCH event for debugging purposes. @@ -619,6 +632,7 @@ Display a PCH event for debugging purposes. (unsigned long)pep->position.seq, (unsigned long)pep->position.column); } /* db_pch_event */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -807,9 +821,11 @@ changed. { db_enter(3, "remove_pch_input_file"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "Removing PCH file: %s\n", pch_input_file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* First close the file. */ if (f_pch_input != NULL) (void)fclose(f_pch_input); @@ -847,9 +863,11 @@ file currently being compiled. If not, remove the associated file. } /* if */ if (remove_file) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "Removing PCH file: %s\n", assoc_pch_file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ delete_file(assoc_pch_file_name); } /* if */ @@ -1019,6 +1037,7 @@ Return TRUE if two PCH events are equivalent. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Comparing PCH event: "); db_pch_event(pep1); @@ -1026,6 +1045,7 @@ Return TRUE if two PCH events are equivalent. db_pch_event(pep2); fprintf(f_debug, " Equivalent: %s\n", result ? "TRUE" : "FALSE"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return result; } /* equivalent_pch_events */ @@ -1052,10 +1072,12 @@ child files encountered. pch_write_string(sfp->full_name); pch_write_value(mod_time); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Writing file timestamp for %s, time is %ld\n", sfp->full_name, (long)mod_time); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ if (sfp->first_child_file != NULL) { @@ -1082,10 +1104,12 @@ timestamp to the PCH output file. pch_write_string(cmfp->full_name); pch_write_value(mod_time); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Writing file timestamp for %s, time is %ld\n", cmfp->full_name, (long)mod_time); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ db_exit(); @@ -1110,10 +1134,12 @@ to the PCH output file. pch_write_string(midp->module_info->resolved_file); pch_write_value(mod_time); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Writing file timestamp for %s, time is %ld\n", midp->module_info->resolved_file, (long)mod_time); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ db_exit(); @@ -1159,6 +1185,7 @@ variable lists. specified address. */ if (psvp->indirect) address = *(a_void_ptr*)address; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Saving %5lu bytes at %p, variable %s %s\n", (unsigned long)psvp->var_size, address, @@ -1167,6 +1194,7 @@ variable lists. : psvp->var_name, psvp->indirect ? "(indirect)" : ""); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ fwrite_with_check(address, psvp->var_size, f_pch_output); } /* for */ @@ -1194,6 +1222,7 @@ variable lists. specified address. */ if (psvp->indirect) address = *(a_void_ptr*)address; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Restoring %5lu bytes at %p, variable %s %s\n", (unsigned long)psvp->var_size, address, @@ -1202,6 +1231,7 @@ variable lists. : psvp->var_name, psvp->indirect ? "(indirect)" : ""); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ fread_with_check(address, psvp->var_size, f_pch_input); } /* for */ @@ -1330,9 +1360,11 @@ in exactly the same manner as that in which they were created. { a_mem_block_header_ptr mbhp = mem_region_table[number]; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Writing memory region %d\n", number); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ while (mbhp != NULL) { sizeof_t size; @@ -1344,10 +1376,12 @@ in exactly the same manner as that in which they were created. pch_write_value(mbhp); fwrite_with_check(mbhp, size, f_pch_output); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Writing %lu bytes from %p\n", (unsigned long)size, mbhp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ mbhp = mbhp->next; } /* while */ @@ -1387,10 +1421,12 @@ the PCH file. /* Create a memory allocation history entry for this block. */ record_mapped_mem_block(mahp->addr, mahp->size); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Mapped bytes from %p for %lu bytes from PCH\n", mahp->addr, (unsigned long)mahp->size); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ close_mapped_input_file(mapped_file); @@ -1407,9 +1443,11 @@ file. See write_a_memory_region for more information. a_mem_block_header_ptr mbhp = mem_region_table[number]; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Reading memory region %d\n", number); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ for (;;) { sizeof_t size; @@ -1418,10 +1456,12 @@ file. See write_a_memory_region for more information. pch_read_value(region_size); pch_read_value(mbhp); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Reading %lu bytes into %p\n", (unsigned long)size, mbhp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ fread_with_check((a_stdio_arg)mbhp, size, f_pch_input); /* See if this is the last block in the memory region. */ @@ -1464,10 +1504,12 @@ header information about the memory regions such as the mem_region_table. f_pch_output); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ /* Write the allocated_in_region information. */ fwrite_with_check(allocated_in_region, sizeof(unsigned long) * mem_regions_used, f_pch_output); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if USE_MMAP_FOR_MEMORY_REGIONS /* When using memory mapping, instead of writing the memory regions one @@ -1531,10 +1573,12 @@ header information about the memory regions such as the mem_region_table. f_pch_input); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ /* Read the allocated_in_region information. */ fread_with_check(allocated_in_region, sizeof(unsigned long) * mem_regions_used, f_pch_input); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if USE_MMAP_FOR_MEMORY_REGIONS /* Read the blocks of memory used for memory region storage. See @@ -1568,6 +1612,7 @@ current point. open_pch_output_file(); pch_message(ec_creating_pch, format_file_name(pch_file_name)); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { a_pch_event_ptr pep; fprintf(f_debug, "Events to be recorded in %s:\n", pch_file_name); @@ -1575,6 +1620,7 @@ current point. db_pch_event(pep); } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Write the string that identifies this file as a precompiled header file. */ @@ -1617,6 +1663,7 @@ current point. #if DEBUG +/* GCOVR_EXCL_START */ static void db_cannot_generate_reason(a_const_char *str) /* Display a debugging message explaining why a precompiled header file @@ -1627,6 +1674,7 @@ can't be generated. fprintf(f_debug, "Cannot generate precompiled header: %s\n", str); } /* if */ } /* db_cannot_generate_reason */ +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ #define db_cannot_generate_reason(str) /* Nothing */ #endif /* !DEBUG */ @@ -1970,6 +2018,7 @@ pch file. Return a pointer to the last matching event. a_boolean is_define = FALSE; a_boolean event_matches = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { /* coverity[tainted_data] */ db_pch_event(&event); @@ -1977,6 +2026,7 @@ pch file. Return a pointer to the last matching event. fprintf(f_debug, "Candidate event list longer than current file\n"); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (pos_in_event_list == NULL) { /* We've reached the end of the event list for this file but there @@ -2104,6 +2154,7 @@ directory. Return TRUE if an applicable PCH was found. db_enter(3, "find_applicable_pch"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { a_pch_event_ptr pep; fprintf(f_debug, "Event list of this file:\n"); @@ -2111,6 +2162,7 @@ directory. Return TRUE if an applicable PCH was found. db_pch_event(pep); } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ best_result_so_far = null_source_position; for (first = first_from_dir = TRUE;;first = FALSE) { @@ -2141,9 +2193,11 @@ directory. Return TRUE if an applicable PCH was found. if (!open_pch_input_file(file_name)) continue; pch_input_file_name = file_name; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Checking %s for applicability\n", file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* See if this PCH file can be used. */ last_matching_event = pch_is_applicable(); @@ -2154,6 +2208,7 @@ directory. Return TRUE if an applicable PCH was found. is_applicable = last_matching_event != NULL; if (is_applicable) result = TRUE; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("pch")) { fprintf(f_debug, "PCH file %s, applicable: %s", file_name, is_applicable ? "TRUE" : "FALSE"); @@ -2169,6 +2224,7 @@ directory. Return TRUE if an applicable PCH was found. } /* if */ } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (is_applicable) { /* See if this precompiled header matches an event later in the source @@ -2500,6 +2556,7 @@ file is created and restored when a PCH file is used. #if DEBUG +/* GCOVR_EXCL_START */ unsigned long db_show_pch_space_used(unsigned long grand_total) /* Show space used by the PCH routines. This is called by @@ -2514,6 +2571,7 @@ routines is reported as part of the symbol table memory used. db_space_used("PCH events", num_pch_events_allocated, a_pch_event); return grand_total; } /* db_show_pch_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -2524,7 +2582,9 @@ Initialize variables used by the precompiled header routines. { db_enter(4, "pch_init"); #if DEBUG +/* GCOVR_EXCL_START */ check_assertion(strcmp(pch_event_kind_names[(int)pchek_last], "last") == 0); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ initialize_pch_id_string(); cannot_do_pch_processing = FALSE; @@ -2546,7 +2606,9 @@ Initialize variables used by the precompiled header routines. new_alloc_history_entries = 0; new_alloc_history = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_pch_events_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Check for conditions that make it impossible to do precompiled header processing. */ diff --git a/src/pch.h b/src/pch.h index 6fbbb0ee90..b5a9da71e7 100644 --- a/src/pch.h +++ b/src/pch.h @@ -43,6 +43,7 @@ enum a_pch_event_kind { }; #if DEBUG +/* GCOVR_EXCL_START */ constexpr a_const_char *pch_event_kind_names[(int)pchek_last+1] /* Table of names of PCH event kinds. @@ -53,6 +54,7 @@ Table of names of PCH event kinds. "pp_directive", "last" }; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -128,9 +130,11 @@ typedef struct a_pch_saved_variable { in order to get the true address of the data to be stored. */ #if DEBUG +/* GCOVR_EXCL_START */ a_const_char *var_name; /* The name of the variable being saved. Used for debug output purposes. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } a_pch_saved_variable; @@ -291,7 +295,9 @@ extern void pch_late_cleanup(void); #endif /* MAKE_FRONT_END_CALLABLE */ #if DEBUG +/* GCOVR_EXCL_START */ extern unsigned long db_show_pch_space_used(unsigned long grand_total); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* diff --git a/src/pragma.c b/src/pragma.c index 2ec5fbb1ae..b26f228c39 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -38,6 +38,7 @@ pointer the caller may alter the list pointed to by the current pointer. (&scope_stack[depth_scope_stack].curr_construct_pragmas) #if DEBUG +/* GCOVR_EXCL_START */ void db_pragma_list(a_pragma_ptr pp) /* @@ -75,6 +76,7 @@ Display the pragma list for a scope for debugging purposes. db_pragma_list(scope->pragmas); } /* db_scope_pragmas */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static a_pragma_kind_description_ptr add_pragma_kind_description @@ -143,7 +145,9 @@ which function to call to process this pragma. pkdp = (a_pragma_kind_description_ptr) alloc_fe(sizeof(a_pragma_kind_description)); #if DEBUG +/* GCOVR_EXCL_START */ num_pragma_descriptions_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pkdp->kind = kind; pkdp->binding_kind = binding_kind; @@ -374,9 +378,11 @@ Construct a pending pragma with the given pragma kind description. break; #endif /* ADD_CHECKING_PRAGMAS_FOR_INTERNAL_TESTING */ #if DEBUG +/* GCOVR_EXCL_START */ case pk_db_opt: case pk_db_name: break; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if NEED_IL_DISPLAY case pk_il_display: @@ -1405,6 +1411,7 @@ has been reached. } /* process_pragmas_at_end_of_source */ #if DEBUG +/* GCOVR_EXCL_START */ void db_opt_pragma(a_pending_pragma_ptr ppp) /* @@ -1460,6 +1467,7 @@ pragma argument as if it were a debug option specified on the command-line. } /* if */ } /* db_name_pragma */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if INCLUDE_EDG_TEST_PRAGMAS @@ -1497,11 +1505,13 @@ are included by EDG for testing purposes. */ { #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("test_pragmas")) { fprintf(f_debug, "In test_next_construct pragma\n"); db_sym(sym_ptr); db_statement(stmt_ptr); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* test_next_construct_pragma */ #endif /* INCLUDE_EDG_TEST_PRAGMAS */ @@ -2132,6 +2142,7 @@ Initialize the pragma description table. es_none); #endif /* ADD_CHECKING_PRAGMAS_FOR_INTERNAL_TESTING */ #if DEBUG +/* GCOVR_EXCL_START */ (void)add_immediate_pragma_kind_description ((a_pragma_kind)pk_db_opt, fn_for_function(db_opt_pragma), @@ -2158,6 +2169,7 @@ Initialize the pragma description table. /*il_info_is_complete=*/FALSE, /*read_string_as_header_name=*/FALSE, es_error); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if NEED_IL_DISPLAY (void)add_next_construct_pragma_kind_description diff --git a/src/pragma.h b/src/pragma.h index 5da56b5d0f..51749a4d50 100644 --- a/src/pragma.h +++ b/src/pragma.h @@ -349,6 +349,7 @@ EXTERN_THREAD a_pragma_kind_description_ptr add_pragma_description call. */ #if DEBUG +/* GCOVR_EXCL_START */ extern void db_pragma_list(a_pragma_ptr pp); @@ -365,6 +366,7 @@ initialized and the results reported in lexical.c. EXTERN_THREAD unsigned long num_pragmas_allocated, num_pragma_descriptions_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if INCLUDE_EDG_TEST_PRAGMAS diff --git a/src/preproc.c b/src/preproc.c index a5cb83b923..39b420010f 100644 --- a/src/preproc.c +++ b/src/preproc.c @@ -82,10 +82,12 @@ STATIC_THREAD a_hash_table_ptr entries. NULL if no such aliases exist. */ #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_include_aliases_allocated; /* Count of include aliases allocated, for space used purposes. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* @@ -131,7 +133,9 @@ pointer to it. iap = alloc_fe_of_type(an_include_alias); #if DEBUG +/* GCOVR_EXCL_START */ num_include_aliases_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ clear_include_alias(iap); return iap; @@ -237,10 +241,12 @@ which an include_alias pragma has been seen. /*create=*/FALSE); if (iap != NULL) result = iap->short_file_name; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("include_alias")) { fprintf(f_debug, "Looking for alias for %s, found %s\n", buf->buffer, result == NULL ? "NULL" : result); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ return result; @@ -594,9 +600,11 @@ Scan and process an #endif directive. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "endif, pp_if_stack_depth = %ld\n", pp_if_stack_depth); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pp_if_stack_depth--; /* Set things up for the check for extra text on the end of the line. */ @@ -625,9 +633,11 @@ Push a new entry on the preprocessing-if stack (pp_if_stack). pp_if_stack[pp_if_stack_depth].if_pos); pp_if_stack[pp_if_stack_depth].else_encountered = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "push, pp_if_stack_depth = %ld\n", pp_if_stack_depth); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* push_pp_if_stack */ @@ -822,9 +832,11 @@ then return. { db_enter(3, "perform_if"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "perform_if, condition = %d\n", condition); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ push_pp_if_stack(); if (condition) { @@ -1720,11 +1732,13 @@ in the metadata file. char *buffer; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_metadata") || db_flag_is_set("dump_full_metadata")) { fprintf(f_debug, "Importing metadata from '%s' returns %x.\n", cmfp->full_name, (unsigned int)cmfp->assembly_index); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Import the top level declarations. */ fetch_pp_tokens = FALSE; @@ -2805,9 +2819,11 @@ there. /* Copy the string to IL memory. */ ppp->pragma_text = make_copy_of_token_string(); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5 || db_flag_is_set("pragma_string")) { fprintf(f_debug, "Saved pragma string: '%s'\n", ppp->pragma_text); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* convert_pragma_to_string */ @@ -2953,9 +2969,11 @@ or __pragma, but not #pragma). ppp->pragma_text = copy_string_to_region(file_scope_region_number, pp_dir_string_buffer); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("pragma_string")) { fprintf(f_debug, "pp-token pragma string: '%s'\n", ppp->pragma_text); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } else { @@ -3092,10 +3110,12 @@ short_name. fn_for_function(compare_include_alias)); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("include_alias")) { fprintf(f_debug, "Creating include alias for %s to %s\n", long_name, short_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Create an entry for long_name and short_name. If an entry already exists for long_name, it will be updated to refer to the (possibly new) @@ -4026,11 +4046,13 @@ typedef struct a_gcc_pragma_options_entry { } a_gcc_pragma_options_entry; #if DEBUG +/* GCOVR_EXCL_START */ /* Counts of entries allocated, to track total use of memory. */ STATIC_THREAD unsigned long num_gcc_pragma_options_stack_entries_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ STATIC_THREAD a_gcc_pragma_options_entry_ptr @@ -4051,7 +4073,9 @@ Allocate and return a GCC pragma options entry. avail_gcc_pragma_options_stack_entries = gpoep->next; } else { #if DEBUG +/* GCOVR_EXCL_START */ ++num_gcc_pragma_options_stack_entries_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ gpoep = alloc_fe_of_type(a_gcc_pragma_options_entry); } /* if */ @@ -4340,11 +4364,13 @@ typedef struct a_upc_pragma_stack_entry { } a_upc_pragma_stack_entry; #if DEBUG +/* GCOVR_EXCL_START */ /* Counts of entries allocated, to track total use of memory. */ STATIC_THREAD unsigned long num_upc_pragma_stack_entries_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ STATIC_THREAD a_upc_pragma_stack_entry_ptr @@ -4369,7 +4395,9 @@ Push an entry onto the top of the stack. avail_upc_pragma_stack_entries = upsep->next; } else { #if DEBUG +/* GCOVR_EXCL_START */ ++num_upc_pragma_stack_entries_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ upsep = (a_upc_pragma_stack_entry_ptr)alloc_fe( sizeof(a_upc_pragma_stack_entry)); @@ -4742,8 +4770,10 @@ typedef struct a_forScope_stack_entry { } a_forScope_stack_entry; #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_forScope_stack_entries_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ STATIC_THREAD a_forScope_stack_entry_ptr @@ -4772,7 +4802,9 @@ Record the given name and the current conformance state in that entry. fssep = (a_forScope_stack_entry_ptr)alloc_fe( sizeof(a_forScope_stack_entry)); #if DEBUG +/* GCOVR_EXCL_START */ ++num_forScope_stack_entries_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ fssep->next = forScope_stack; @@ -5408,6 +5440,7 @@ is asked to act like cpp. } /* cpp_driver */ #if DEBUG +/* GCOVR_EXCL_START */ unsigned long show_preproc_space_used(void) /* @@ -5448,6 +5481,7 @@ Display and return the amount of space used for preprocessing structures. return (grand_total); } /* show_preproc_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void preproc_one_time_init(void) @@ -5461,7 +5495,9 @@ One-time initialization for preproc.c and preproc.h variables. #if UPC_EXTENSIONS_ALLOWED pch_saved_var_array_elem(avail_upc_pragma_stack_entries), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_upc_pragma_stack_entries_allocated), +/* GCOVR_EXCL_STOP */ #endif /* if DEBUG */ #endif /* UPC_EXTENSIONS_ALLOWED */ #if MICROSOFT_EXTENSIONS_ALLOWED @@ -5469,13 +5505,17 @@ One-time initialization for preproc.c and preproc.h variables. pch_saved_var_array_elem(forScope_stack), pch_saved_var_array_elem(avail_forScope_stack_entries), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_forScope_stack_entries_allocated), +/* GCOVR_EXCL_STOP */ #endif /* if DEBUG */ #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ #if GNU_EXTENSIONS_ALLOWED pch_saved_var_array_elem(avail_gcc_pragma_options_stack_entries), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_gcc_pragma_options_stack_entries_allocated), +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* GNU_EXTENSIONS_ALLOWED */ pch_saved_var_array_terminating_elem() @@ -5556,7 +5596,9 @@ init_predefined_macros.) #if UPC_EXTENSIONS_ALLOWED avail_upc_pragma_stack_entries = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_upc_pragma_stack_entries_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* UPC_EXTENSIONS_ALLOWED */ header_name_buffer = alloc_text_buffer(256); @@ -5564,14 +5606,18 @@ init_predefined_macros.) avail_forScope_stack_entries = NULL; include_alias_hash_table = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_forScope_stack_entries_allocated = 0; num_include_aliases_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ #if GNU_EXTENSIONS_ALLOWED avail_gcc_pragma_options_stack_entries = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_gcc_pragma_options_stack_entries_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* GNU_EXTENSIONS_ALLOWED */ } /* preproc_init */ diff --git a/src/preproc.h b/src/preproc.h index 43ec0557bc..e47952bc2a 100644 --- a/src/preproc.h +++ b/src/preproc.h @@ -61,6 +61,7 @@ enum a_pp_directive_kind { }; #if DEBUG +/* GCOVR_EXCL_START */ /* Table of names of preprocessing directives, used as event kinds for PCH processing. This is not the definition of the preprocessing directive @@ -106,6 +107,7 @@ EXTERN_CONSTINIT_ARRAY(a_const_char*, pp_directive_kind_names, } #endif /* VAR_INITIALIZERS */ EXTERN_CONSTINIT_ARRAY_END(pp_directive_kind_names) +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -378,8 +380,10 @@ extern void preproc_trans_unit_init(void); extern void preproc_init(void); #if DEBUG +/* GCOVR_EXCL_START */ /* Show and return the amount of memory used by preprocessing structures. */ extern unsigned long show_preproc_space_used(void); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG*/ #if MICROSOFT_EXTENSIONS_ALLOWED diff --git a/src/scope_stk.c b/src/scope_stk.c index c4b12ca1a9..cb79267731 100644 --- a/src/scope_stk.c +++ b/src/scope_stk.c @@ -86,6 +86,7 @@ STATIC_THREAD a_boolean #endif /* GENERATE_SOURCE_SEQUENCE_LISTS */ #if DEBUG +/* GCOVR_EXCL_START */ /* Counts of tables allocated, to track total use of memory. */ @@ -449,6 +450,7 @@ Display some statistics about the scope stack. fprintf(f_debug, "%24s: %8lu\n", "TOTAL", total); } /* db_scope_stack_stats */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if NEED_NAME_MANGLING @@ -1111,7 +1113,9 @@ Allocate and initialize a string literal table for scope stack entry "ssep". if (avail_string_literal_tables == NULL) { sltp = alloc_fe_of_type(a_string_literal_table); #if DEBUG +/* GCOVR_EXCL_START */ num_string_literal_tables_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { sltp = avail_string_literal_tables; @@ -1194,7 +1198,9 @@ assign one now. sltep->next = *bucket; *bucket = sltep; #if DEBUG +/* GCOVR_EXCL_START */ num_string_literal_table_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ cp->variant.string.sequence_number = sltep->sequence_number; @@ -1221,7 +1227,9 @@ scope. fsctp = alloc_fe_of_type(a_function_shareable_constants_table); memzero((char *)fsctp->table, sizeof(fsctp->table)); #if DEBUG +/* GCOVR_EXCL_START */ num_function_shareable_constants_tables_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ fsctp->next = NULL; @@ -1281,8 +1289,10 @@ STATIC_THREAD a_c99_inline_definition_locator_ptr in use. */ #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_c99_inline_definition_locators_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void check_c99_inline_definition(a_variable_ptr var, @@ -1329,7 +1339,9 @@ the suspect construct is a reference to a file-scope static entity. if (avail_c99_inline_definition_locators == NULL) { to_check = alloc_fe_of_type(a_c99_inline_definition_locator); #if DEBUG +/* GCOVR_EXCL_START */ ++num_c99_inline_definition_locators_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { to_check = avail_c99_inline_definition_locators; @@ -1551,7 +1563,9 @@ return a pointer to the new entry. Reuse a freed entry if possible. audp = (an_active_using_directive_ptr) alloc_fe(sizeof(an_active_using_directive)); #if DEBUG +/* GCOVR_EXCL_START */ num_active_using_directives_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ audp->entry = NULL; @@ -1680,6 +1694,7 @@ using-directives specified after the point of definition of the template. audp->effective_decl_seq = effective_decl_seq; ssep->active_using_directives = audp; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("using_dir")) { fprintf(f_debug, "adding using-dir at depth %d for namespace %s applies at %d", @@ -1689,6 +1704,7 @@ using-directives specified after the point of definition of the template. fprintf(f_debug, ", decl_seq %lu\n", (unsigned long)effective_decl_seq); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Add the using directive to the list for scope at which this using directive applies. */ @@ -2376,6 +2392,7 @@ specified after the point of definition of the template. new_depth = NO_SCOPE_DEPTH; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("using_dir")) { fprintf(f_debug, "%s using-dir at depth %d for namespace %s applies at %d", @@ -2386,6 +2403,7 @@ specified after the point of definition of the template. fprintf(f_debug, ", decl_seq %lu\n", (unsigned long)effective_decl_seq); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Record the scope depth of the innermost active using directive for this namespace. If we are clearing the flags, reset this depth @@ -3915,6 +3933,7 @@ the scope being pushed. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ ++scope_kind_stats[ssep->kind]; if (depth_scope_stack > max_depth_scope_stack) { max_depth_scope_stack = depth_scope_stack; @@ -3922,6 +3941,7 @@ the scope being pushed. if (debug_level >= 3) { db_scope_stack(); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return sp; @@ -5935,6 +5955,7 @@ class to be defined. } /* if */ } #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("instantiation_scope")) { fprintf(f_debug, "Pushed instantiation scope for: "); db_symbol(instance_sym, "", 0); @@ -5945,6 +5966,7 @@ class to be defined. fprintf(f_debug, "scope stack after instantiation scope:\n"); db_scope_stack(); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Return TRUE if a scope was pushed. */ @@ -7617,6 +7639,7 @@ curr_routine points to the routine entry; otherwise, it is NULL. } /* for */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("hash_stats")) { a_hash_table_ptr htp; /* Display statistics about any templates with a large number of @@ -7629,6 +7652,7 @@ curr_routine points to the routine entry; otherwise, it is NULL. db_hash_statistics(htp); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } break; @@ -8032,6 +8056,7 @@ about the scope being popped. db_enter(3, "wrapup_scope"); #if DEBUG +/* GCOVR_EXCL_START */ #if EXTRA_SOURCE_POSITIONS_IN_IL if (debug_level >= 3 || db_flag_is_set("dump_decl_pos_info")) { switch(kind) { @@ -8047,6 +8072,7 @@ about the scope being popped. } /* switch */ } /* if */ #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Save values from the pointers block that will be used later. This is done to guard against the scope stack being reallocated (e.g., by @@ -8146,6 +8172,7 @@ about the scope being popped. Check for unreferenced symbols, and issue warnings for those. */ for (sym = symbol_list; sym != NULL; sym = sym->next_in_scope) { #if DEBUG +/* GCOVR_EXCL_START */ if (db_active && (debug_level >= 3 || db_flag_is_set("dump_symbols"))) { @@ -8164,6 +8191,7 @@ about the scope being popped. db_symbol(sym, "", 2); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (kind == (a_scope_kind)sck_func_prototype && !is_tag_symbol(sym)) { /* Don't check on symbols entered in the scope of a function prototype. @@ -8519,9 +8547,11 @@ been completed. if (scope->kind == (a_scope_kind)sck_file) { /* Top-level call. */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("needed_flags")) { fprintf(f_debug, "Start of set_needed_flags_at_end_of_file_scope\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ end_of_file_scope_needed_flags_phase = TRUE; } else { @@ -8606,9 +8636,11 @@ been completed. set_needed_flags_for_typedefs(scope); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("needed_flags")) { fprintf(f_debug, "End of set_needed_flags_at_end_of_file_scope\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ end_of_file_scope_needed_flags_phase = FALSE; } /* if */ @@ -8932,12 +8964,14 @@ the scope stack is no longer available. db_enter(1, "finish_function_body_processing"); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ffbp") || debug_level >= 1 || db_has_traced_name(routine, iek_routine)) { fprintf(f_debug, "Finishing function body processing for "); db_name_full(&routine->source_corresp, iek_routine); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_assertion(!scope->function_body_processing_finished); /* Do not do lowering and related processing of functions in secondary @@ -9014,11 +9048,13 @@ the scope stack is no longer available. if (is_needed) { mark_as_needed((char *)routine, (an_il_entry_kind)iek_routine); #if DEBUG +/* GCOVR_EXCL_START */ } else if (debug_level >= 3) { fprintf(f_debug, "Not calling mark_as_needed for \""); db_name_full(&routine->source_corresp, iek_routine); fprintf(f_debug, "\", storage class is %s\n", db_storage_class_names[(int)routine->storage_class]); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } @@ -9059,8 +9095,10 @@ STATIC_THREAD a_delayed_lowering_list_entry_ptr available. */ #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_delayed_lowering_list_entries_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void lower_functions_waiting_for_module_id(void) @@ -9487,7 +9525,9 @@ be lowered as soon as a module id becomes available (and TRUE is returned). a_delayed_lowering_list_entry *entry = alloc_fe_of_type(a_delayed_lowering_list_entry); #if DEBUG +/* GCOVR_EXCL_START */ num_delayed_lowering_list_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ entry->routine = routine; entry->next = NULL; @@ -9902,6 +9942,7 @@ being popped. curr_routine = ssep->il_scope->variant.routine.ptr; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { if (pointers_block->symbols != NULL || debug_level >= 4) { fprintf(f_debug, "pop_scope: number = %ld, depth = %d", @@ -9939,6 +9980,7 @@ being popped. (void)fputc('\n', f_debug); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_assertion(ssep->class_fixup_header.fixup_list == NULL); if (!(ssep->kind == (a_scope_kind)sck_file && ssep->is_reactivation)) { @@ -10212,12 +10254,14 @@ being popped. fixup_function_scope_source_sequence_list(il_scope); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_flag_is_set("dump_ss") || db_flag_is_set("dump_ss_full")) { /* Display source sequence lists for debug purposes. */ db_ss_list_for_scope(il_scope); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -10253,6 +10297,7 @@ being popped. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (kind == (a_scope_kind)sck_file || kind == (a_scope_kind)sck_function) { /* Dump type list and object lifetime information. */ @@ -10268,6 +10313,7 @@ being popped. } /* if */ } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Determine and remember the current (old) memory region, to see if it changes when returning to the outer scope. */ @@ -10466,11 +10512,13 @@ being popped. #if GENERATE_SOURCE_SEQUENCE_LISTS if (ssep->source_sequence_list != NULL) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("popping ", f_debug); db_scope_stack_entry_at_depth(depth_scope_stack); fputs("\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if TEMPLATE_INSTANTIATIONS_IN_SOURCE_SEQUENCE_LISTS if (ssep->kind == (a_scope_kind)sck_template_instantiation && @@ -10487,12 +10535,14 @@ being popped. /* Do not add code here. */ { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("moving source sequences to ", f_debug); db_scope_stack_entry_at_depth(depth_scope_stack-1); fputs(":\n", f_debug); db_ss_list_for_scope_depth(depth_scope_stack); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } } /* if */ @@ -10785,10 +10835,12 @@ current scope is already a reactivation of the requested scope. set_template_decl_lookup_sequence(initial_depth); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ns_react_on_templ_decl")) { fprintf(f_debug, "Scope stack after namespace reactivation:\n"); db_scope_stack(); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* f_push_namespace_reactivation_scope */ @@ -11391,7 +11443,9 @@ in such cases. /* Allocate a new entry. */ prp = alloc_fe_of_type(a_pack_reference); #if DEBUG +/* GCOVR_EXCL_START */ num_pack_references_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ prp->next = NULL; @@ -11504,7 +11558,9 @@ to it. /* Allocate a new entry. */ pedp = alloc_fe_of_type(a_pack_expansion_descr); #if DEBUG +/* GCOVR_EXCL_START */ num_pack_expansion_descrs_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ pedp->next = NULL; @@ -11619,7 +11675,9 @@ pointer to it. /* Allocate a new entry. */ pidp = alloc_fe_of_type(a_pack_instantiation_descr); #if DEBUG +/* GCOVR_EXCL_START */ num_pack_instantiation_descrs_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ pidp->next = NULL; @@ -11661,7 +11719,9 @@ to it. /* Allocate a new entry. */ pesep = alloc_fe_of_type(a_pack_expansion_stack_entry); #if DEBUG +/* GCOVR_EXCL_START */ num_pack_expansion_stack_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ pesep->next = NULL; @@ -11733,6 +11793,7 @@ Pop the current entry off of the pack expansion stack. } /* pop_pack_expansion_stack */ #if DEBUG +/* GCOVR_EXCL_START */ static inline a_boolean is_pack_within_cache(a_token_cache_ptr cache, a_pack_expansion_descr_ptr pedp) @@ -11805,6 +11866,7 @@ Display the tokens that make up a pack expansion, for debugging purposes. } /* if */ } /* db_pack_tokens */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -11840,10 +11902,12 @@ determine whether we are entering a pack expansion context. a_scope_stack_entry_ptr ssep; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("packs")) { fprintf(f_debug, "Looking for pack expansion at TSN %ld\n", (long)curr_token_sequence_number); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ for (ssep = scope_stack_entry_for(depth_innermost_instantiation_scope); ssep != NULL; ssep = previous_scope_of(ssep)) { @@ -11916,6 +11980,7 @@ determine whether we are entering a pack expansion context. } /* if */ } /* for */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("packs")) { if (result_pedp != NULL) { fprintf(f_debug, "Found pack expansion from %ld to %ld\n", @@ -11923,6 +11988,7 @@ determine whether we are entering a pack expansion context. db_pack_tokens(result_pedp); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return result_pedp; } /* get_pack_expansion_for_curr_context */ @@ -13942,11 +14008,13 @@ to expand the pack in a real instantiation. a_scope_stack_entry_ptr ssep; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("packs")) { fprintf(f_debug, "Recording pack expansion from %ld to %ld\n", (long)pedp->first_token, (long)pedp->last_token); db_pack_tokens(pedp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Get the template declaration information entry associated with the current context. */ @@ -14021,6 +14089,7 @@ that list to pedp. *p_first_prp = last_prp->next; last_prp->next = NULL; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("packs")) { fprintf(f_debug, "Extracting references for:\n"); for (prp = pedp->packs_referenced; prp != NULL; prp = prp->next) { @@ -14030,6 +14099,7 @@ that list to pedp. (unsigned long)prp->token_sequence_number); } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ { /* Make sure the same symbol is not on the extracted list more than @@ -14671,6 +14741,7 @@ form. if (*p_prp != NULL) prp->next = *p_prp; *p_prp = prp; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("packs")) { fprintf(f_debug, "Recording pack reference for "); if (pack_symbol != NULL) { @@ -14681,6 +14752,7 @@ form. fprintf(f_debug, " at tsn %lu\n", (unsigned long)curr_token_sequence_number); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* We don't associate pack references with contexts yet, but record @@ -14934,6 +15006,7 @@ Return TRUE if source sequence entries might appear in the IL tree. } /* src_seq_entries_permitted_in_il */ #if DEBUG +/* GCOVR_EXCL_START */ unsigned long db_show_scope_stack_space_used(unsigned long grand_total) /* @@ -14987,6 +15060,7 @@ routines is reported as part of the symbol table memory used. return grand_total; } /* db_show_scope_stack_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void scope_stk_one_time_init(void) @@ -15022,22 +15096,28 @@ are handled in scope_stk_init.) pch_saved_var_array_elem(avail_string_literal_tables), pch_saved_var_array_elem(avail_string_literal_table_entries), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_string_literal_tables_allocated), pch_saved_var_array_elem(num_string_literal_table_entries_allocated), +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* DO_IL_LOWERING && ASSIGN_STRING_LITERAL_SEQUENCE_NUMBERS */ #if DO_IL_LOWERING && MODULE_ID_NEEDED && !STANDALONE_UTILITY_PROGRAM pch_saved_var_array_elem(waiting_for_module_id_list_head), pch_saved_var_array_elem(waiting_for_module_id_list_tail), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_delayed_lowering_list_entries_allocated), +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* DO_IL_LOWERING && MODULE_ID_NEEDED && !STANDALONE_UTILITY_PROGRAM */ pch_saved_var_array_elem(c99_inline_definition_locators_to_check), pch_saved_var_array_elem(avail_c99_inline_definition_locators), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem( num_c99_inline_definition_locators_allocated), +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pch_saved_var_array_terminating_elem() }; @@ -15148,24 +15228,30 @@ of the front end. avail_string_literal_tables = NULL; avail_string_literal_table_entries = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_string_literal_table_entries_allocated = 0; num_string_literal_tables_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* DO_IL_LOWERING && ASSIGN_STRING_LITERAL_SEQUENCE_NUMBERS */ avail_c99_inline_definition_locators = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_c99_inline_definition_locators_allocated = 0; num_function_shareable_constants_tables_allocated = 0; num_pack_expansion_stack_entries_allocated = 0; num_pack_references_allocated = 0; num_pack_expansion_descrs_allocated = 0; num_pack_instantiation_descrs_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if DO_IL_LOWERING && MODULE_ID_NEEDED && !STANDALONE_UTILITY_PROGRAM waiting_for_module_id_list_head = NULL; waiting_for_module_id_list_tail = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_delayed_lowering_list_entries_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* DO_IL_LOWERING && MODULE_ID_NEEDED && !STANDALONE_UTILITY_PROGRAM */ function_body_processing_delayed_on_some_func_in_primary_il = FALSE; diff --git a/src/scope_stk.h b/src/scope_stk.h index 1c8607988e..aca46f0805 100644 --- a/src/scope_stk.h +++ b/src/scope_stk.h @@ -2744,6 +2744,7 @@ extern void scope_stk_trans_unit_init(void); extern void scope_stk_init(void); #if DEBUG +/* GCOVR_EXCL_START */ extern void db_pack_tokens(a_pack_expansion_descr_ptr pedp); extern int db_scope_kind(a_scope_kind sck); @@ -2765,6 +2766,7 @@ extern void db_decl_pos_info(a_symbol_ptr sym); #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ extern unsigned long db_show_scope_stack_space_used(unsigned long grand_total); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if DO_IL_LOWERING diff --git a/src/src_seq.c b/src/src_seq.c index 39bc6e1591..9e96f33406 100644 --- a/src/src_seq.c +++ b/src/src_seq.c @@ -27,6 +27,7 @@ BEGIN_EDG_NAMESPACE #if !STANDALONE_UTILITY_PROGRAM #if DEBUG +/* GCOVR_EXCL_START */ void db_source_sequence_entry(a_source_sequence_entry_ptr ssep) /* @@ -537,6 +538,7 @@ debugging purposes. } /* if */ } /* db_ss_list_for_scope */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void fixup_function_scope_source_sequence_list(a_scope_ptr sp) @@ -624,6 +626,7 @@ separate sublists. } /* if */ } /* for */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { if (sp->src_seq_sublist_list == NULL) { fputs("fixup: no change to source sequence list for ", f_debug); @@ -634,6 +637,7 @@ separate sublists. db_ss_list_for_scope(sp); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* fixup_function_scope_source_sequence_list */ @@ -835,6 +839,7 @@ will go on a sublist if it was allocated in the file-scope memory region. check_assertion(scope_stack_ptr->module_load_context_count == 0); #endif /* CHECKING || DEBUG || TEMPLATE_INSTANTIATIONS_IN_SOURCE_... */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { a_scope_depth depth_ss_list_scope = (depth_innermost_function_scope == NO_SCOPE_DEPTH) ? @@ -853,6 +858,7 @@ will go on a sublist if it was allocated in the file-scope memory region. fputs(":\n ", f_debug); db_source_sequence_entry(new_ssep); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (scope_stack[depth_scope_stack].source_sequence_list == NULL) { scope_stack[depth_scope_stack].source_sequence_list = new_ssep; @@ -1035,10 +1041,12 @@ entry that has already been created and linked in for this entity. add_source_sequence_entry_to_list(new_ssep); } else { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("empty ss entry changed to ", f_debug); db_source_sequence_entry(new_ssep); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ db_exit(); @@ -1168,12 +1176,14 @@ sequence list. ss_list->next->prev = ss_list; tssp->variant.class_template.source_sequence_list = ss_list; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("ss-list for prototype instantiation of ", f_debug); db_type_name(tp); fputs(":\n", f_debug); db_ss_list_for_prototype_instantiation(ss_list, 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -1210,6 +1220,7 @@ end; otherwise, insert it immediately before insert_before. scope_stack_ptr = NULL; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { a_source_sequence_entry_ptr after_tail = tail->next; @@ -1232,6 +1243,7 @@ end; otherwise, insert it immediately before insert_before. db_ss_list(head); tail->next = after_tail; } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (insert_before == NULL) { check_assertion(scope_stack_ptr != NULL); @@ -1284,12 +1296,14 @@ fixup_function_scope_source_sequence_list has been called.) a_scope_stack_entry_ptr scope_stack_ptr = &scope_stack[depth]; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("removing from source sequence list for ", f_debug); db_scope(scope_stack_ptr->il_scope); fputs(":\n ", f_debug); db_source_sequence_entry(ssep); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if TEMPLATE_INSTANTIATIONS_IN_SOURCE_SEQUENCE_LISTS if (scope_stack_ptr->ss_list_instantiation_insert_point == ssep) { @@ -1755,6 +1769,7 @@ innermost such class. db_enter(4, "find_instantiation_insert_scope"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("finding insert point for ", f_debug); db_source_sequence_entry(ssep); @@ -1762,6 +1777,7 @@ innermost such class. db_scope_stack_entry_at_depth((a_scope_depth)(curr_sse_ptr - scope_stack)); fputs("\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Identify IL entity that is being instantiated. */ entity_kind = ss_entry_kind(ssep); @@ -1807,6 +1823,7 @@ innermost such class. parent_scope_depth = find_innermost_namespace_scope_depth(curr_sse_ptr); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs(" entity: ", f_debug); if (scp->assoc_info == NULL) { @@ -1827,6 +1844,7 @@ innermost such class. fputs("\n", f_debug); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ for (ref_scope_depth = depth_scope_stack; ref_scope_depth > NO_SCOPE_DEPTH; @@ -1910,11 +1928,13 @@ innermost such class. unexpected_condition(); } /* switch */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs(" entity type: ", f_debug); db_type_name(entity_type); fputs("\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ for (; ref_scope_depth > NO_SCOPE_DEPTH; ref_scope_depth--) { if (parent_scope_depth != NO_SCOPE_DEPTH && @@ -1934,12 +1954,14 @@ innermost such class. depth_in_scope_stack == NO_SCOPE_DEPTH); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fprintf(f_debug, " checking ref scope%s: ", members_only ? " (members only)" : ""); db_scope_stack_entry_at_depth(ref_scope_depth); fputs("\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (type_involves_specific_class_type(entity_type, class_type, members_only) || @@ -1982,6 +2004,7 @@ innermost such class. : scope_stack[insert_scope_depth] .ss_list_instantiation_insert_point; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fprintf(f_debug, "insert point found: %s list for ", insert_point == NULL ? "at end of" : "in"); @@ -1993,6 +2016,7 @@ innermost such class. fputs("\n", f_debug); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return insert_scope_depth; @@ -2144,6 +2168,7 @@ declared_type points to a type that should be recorded in the entry. sssdp->specialized_with_new_syntax = TRUE; #endif /* BACK_END_IS_CP_GEN_BE */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("partial instantiation of ", f_debug); @@ -2151,6 +2176,7 @@ declared_type points to a type that should be recorded in the entry. source_corresp.assoc_info); fputs("\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* if DEBUG */ switch_to_file_scope_region(®ion_to_switch_back_to); ssep = alloc_source_sequence_entry(); @@ -2167,12 +2193,14 @@ declared_type points to a type that should be recorded in the entry. entry to the source sequence list at this time; it will be done later. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("deferring addition to ss-list for", f_debug); fputs(" partial instantiation of \"", f_debug); db_name(&((a_routine_ptr)ptr)->source_corresp); fputs("\"\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* if DEBUG */ sym->variant.routine.instance_ptr->partial_instantiation = ssep; } else @@ -3105,10 +3133,12 @@ associated with the indicated sck_function scope. because there is no secondary source sequence entry to fall back on. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("dropping: ", f_debug); db_source_sequence_entry(ssep); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ remove_src_seq_entry(ssep); /* The source-sequence entry pointer in the routine needs to be @@ -3388,10 +3418,12 @@ successor of ssep. #endif /* CHECKING */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("checking nonautonomous tag: ", f_debug); db_source_sequence_entry(ssep); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_next_ssep: /* Note: we may loop back to this point for the special case of an @@ -3406,10 +3438,12 @@ successor of ssep. skip over any that intervene between the struct/enum definition and whatever follows. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("skipping: ", f_debug); db_source_sequence_entry(next_ssep); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ next_ssep = next_ssep->next; } /* while */ @@ -3488,10 +3522,12 @@ successor of ssep. sssdp->declared_in_func_prototype = FALSE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("marked autonomous: ", f_debug); db_source_sequence_entry(ssep); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -3613,10 +3649,12 @@ scope that are not really needed in the IL. if (kind == iek_variable || kind == iek_routine || kind == iek_type || kind == iek_instantiation_directive) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("dropping: ", f_debug); db_source_sequence_entry(ssep); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* If the entry about to be dropped is for a primary declarator (i.e., not one appearing after the first in a comma-separated list) and a @@ -3661,6 +3699,7 @@ scope that are not really needed in the IL. } /* if */ } /* for */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_active) { /* Display source sequence lists for debug purposes. */ if (debug_level >= 3 || db_flag_is_set("dump_elim") || @@ -3669,6 +3708,7 @@ scope that are not really needed in the IL. db_ss_list_for_scope(scope); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* eliminate_unneeded_source_sequence_entries */ diff --git a/src/src_seq.h b/src/src_seq.h index 241be9a1b9..4e040c418e 100644 --- a/src/src_seq.h +++ b/src/src_seq.h @@ -41,10 +41,12 @@ pointer to the sublist header. #define assoc_sublist_of(ssep) ss_entry_ptr((ssep), a_src_seq_sublist_ptr) #if DEBUG +/* GCOVR_EXCL_START */ extern void db_source_sequence_entry(a_source_sequence_entry_ptr ssep); extern void db_ss_list(a_source_sequence_entry_ptr ssep); extern void db_ss_list_for_scope_depth(a_scope_depth depth); extern void db_ss_list_for_scope(a_scope_ptr sp); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ extern void fixup_function_scope_source_sequence_list(a_scope_ptr sp); diff --git a/src/statements.c b/src/statements.c index 9000e44085..8328251d3a 100644 --- a/src/statements.c +++ b/src/statements.c @@ -114,11 +114,13 @@ STATIC_THREAD a_statement_ptr #endif /* UPC_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ /* Counts of tables allocated, to track total use of memory. */ STATIC_THREAD unsigned long num_control_flow_descrs_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* @@ -317,6 +319,7 @@ expression, issue an error at the indicated source position. } /* statement_not_allowed_inside_statement_expression */ #if DEBUG +/* GCOVR_EXCL_START */ static void db_cfd(a_control_flow_descr_ptr cfdp) /* @@ -558,13 +561,16 @@ dump_control_flow has been enabled at the command line. fprintf(f_debug, "ssk_%s\n", str); } /* db_ssse_with_indentation */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long cfd_id_number; /* Identifier number used in control flow debug output. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static a_control_flow_descr_ptr alloc_control_flow_descr( @@ -586,7 +592,9 @@ to it. /* Allocate a new entry. */ cfdp = (a_control_flow_descr_ptr)alloc_fe(sizeof(a_control_flow_descr)); #if DEBUG +/* GCOVR_EXCL_START */ num_control_flow_descrs_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Set the entry's fields to default values. */ @@ -596,7 +604,9 @@ to it. cfdp->kind = kind; cfdp->source_pos = error_position; #if DEBUG +/* GCOVR_EXCL_START */ cfdp->id_number = ++cfd_id_number; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if UPC_EXTENSIONS_ALLOWED cfdp->enclosing_forall = NULL; @@ -673,6 +683,7 @@ pointers) and move the list as a whole to the available list. db_enter(5, "remove_list_of_control_flow_descrs"); if (head != NULL) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { a_control_flow_descr_ptr cfdp = head; fprintf(f_debug, "Removing entire list:\n"); @@ -691,6 +702,7 @@ pointers) and move the list as a whole to the available list. } /* if */ } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Reset the next pointer of the entry on the list that precedes head, or if there is no preceding entry reset the list head pointer. */ @@ -724,10 +736,12 @@ forth, are decremented. { db_enter(5, "remove_control_flow_descr"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Removing: "); db_cfd(cfdp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Reset the next pointer of the entry on the list that precedes cfdp, or if there is no preceding entry reset the list head pointer. */ @@ -886,10 +900,12 @@ that is being generated. db_enter(4, "report_switch_past_init"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "block = "); db_cfd(block); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Start at the first entry within the block. */ cfdp = block->next; @@ -1314,10 +1330,12 @@ initializing declarations. db_enter(4, "add_to_control_flow_descr_list"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Candidate to add to list: "); db_cfd(new_cfdp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (control_flow_descr_list == NULL) { /* Add this entry to the start of the list. */ @@ -1515,10 +1533,12 @@ initializing declarations. } /* switch */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Adding: "); db_cfd_and_parents(new_cfdp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Actually append it to the list. */ end_of_control_flow_descr_list->next = new_cfdp; @@ -1537,16 +1557,20 @@ initializing declarations. remove_unneeded_set_vla_size_control_flow_entries(new_cfdp); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_control_flow")) { db_cfd_with_indentation(new_cfdp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ done:; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Tail of control_flow_descr_list:\n"); db_cfd_list(end_of_control_flow_descr_list,10,0); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* add_to_control_flow_descr_list */ @@ -2220,11 +2244,13 @@ may produce enk_vla_dealloc entries from those elsewhere). expr->variant.vla_variable = vla_var; result = alloc_expr_statement(expr); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs(" creating vla-dealloc statement for \"", f_debug); db_name(&vla_var->source_corresp); fputs("\"\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_assertion(C_mode()); return result; @@ -2248,6 +2274,7 @@ by traversing the control-flow list backwards from *start to *end. db_enter(4, "collect_vla_dealloc_stmts"); check_assertion(vla_deallocations_in_il); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level == 4) { fputs(" start = ", f_debug); db_cfd(start); @@ -2258,6 +2285,7 @@ by traversing the control-flow list backwards from *start to *end. db_cfd(end); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ cfdp = start; parent = cfdp->parent; @@ -2275,10 +2303,12 @@ by traversing the control-flow list backwards from *start to *end. check_assertion(parent != NULL); if (!parent->variant.block.any_vla_variables) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level == 4) { fputs(" skipping block (no vla vars): ", f_debug); db_cfd(parent); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (parent == end_parent) { done = TRUE; @@ -2294,12 +2324,14 @@ by traversing the control-flow list backwards from *start to *end. stop_at = parent; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level == 4) { fputs(" inner loop: first entry = ", f_debug); db_cfd(cfdp); fputs(" stop_at = ", f_debug); db_cfd(stop_at); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Back up from *cfdp to *stop_at, looking for VLA variable declarations. */ @@ -2333,18 +2365,22 @@ by traversing the control-flow list backwards from *start to *end. /* Skip a nested block. */ cfdp = cfdp->variant.start_of_block; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level == 4) { fputs(" skipping nested block: ", f_debug); db_cfd(cfdp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ cfdp = cfdp->prev; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level == 4) { fputs(" inner loop: next entry = ", f_debug); db_cfd(cfdp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* while */ /* cpfe now points to the start of a block. Keep stepping through @@ -2465,10 +2501,12 @@ the goto, and label_cfsp describes the associated label. db_enter(4, "add_vla_dealloc_stmts_for_goto"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level == 4) { db_cfd(goto_cfdp); db_cfd(label_cfdp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* If the last entry on the control flow list is goto_cfdp, then the label has already been defined and this is a backwards goto; otherwise @@ -2504,6 +2542,7 @@ the goto, and label_cfsp describes the associated label. if (forward_goto) outermost_noncommon_parent = goto_parent; } /* for */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level == 4) { fputs("common_parent = ", f_debug); if (common_parent == NULL) { @@ -2518,6 +2557,7 @@ the goto, and label_cfsp describes the associated label. db_cfd(outermost_noncommon_parent); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* There are 2 orthogonal sets of criteria for determining how to search for VLAs that need to be deallocated. There is the direction of the @@ -2749,6 +2789,7 @@ function should only be called in C++ mode. db_enter(4, "common_object_lifetime"); if (olp1 != olp2) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { db_object_lifetime_stack(); fputs("olp1 = ", f_debug); @@ -2756,6 +2797,7 @@ function should only be called in C++ mode. fputs("olp2 = ", f_debug); db_object_lifetime(olp2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* The outer loop follows olp2 and its parent lifetimes. */ for (; olp2 != function_scope_object_lifetime; @@ -2767,10 +2809,12 @@ function should only be called in C++ mode. if (olp == olp2) { /* Found a match. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("common = ", f_debug); db_object_lifetime(olp2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ goto done; } /* if */ @@ -3028,9 +3072,11 @@ statement is the top block of a GNU statement expression ({ ... }). sssep->p_start_pos = NULL; sssep->fallthrough_statement = NULL; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_control_flow")) { db_ssse_with_indentation(kind, "pushing "); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (kind == ssk_compound && !block_stmt_is_cfront_dependent_stmt(sp)) { sssep->depth_of_assoc_scope = depth_scope_stack; @@ -3465,9 +3511,11 @@ a structured statement has ended. break_label = sssep->break_label; break_statements = sssep->break_statements; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_control_flow")) { db_ssse_with_indentation(kind, "popping "); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Pop the stack. */ depth_stmt_stack--; @@ -6051,12 +6099,14 @@ generated. db_enter(4, "report_goto_past_init"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "start_cfdp = "); db_cfd(start_cfdp); fprintf(f_debug, "end_cfdp = "); db_cfd(end_cfdp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (end_cfdp->parent != start_cfdp->parent) { report_goto_past_init(start_cfdp, end_cfdp->parent->prev, error_pos, @@ -6067,6 +6117,7 @@ generated. /*lint --e{850} cfdp modified in loop */ for (cfdp = start_cfdp; ; cfdp = cfdp->next) { #if DEBUG +/* GCOVR_EXCL_START */ #if CHECKING if (cfdp->parent != end_cfdp->parent || cfdp->id_number > end_cfdp->id_number) { @@ -6079,6 +6130,7 @@ generated. internal_error("report_goto_past_init: start > end or parent mismatch"); } /* if */ #endif /* CHECKING */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (cfdp->kind == (a_control_flow_descr_kind)cfdk_init) { an_error_severity severity = es_none; @@ -6167,10 +6219,12 @@ generated. if (cfdp->kind == (a_control_flow_descr_kind)cfdk_block) { cfdp = cfdp->variant.block.end_of_block; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "jumped over block -- cfdp = "); db_cfd(cfdp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (cfdp == end_cfdp) break; } /* if */ @@ -6207,6 +6261,7 @@ diagnose the condition. } /* if */ start_cfdp = NULL; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "checking %s jump from: ", is_forward ? "forward" : "backwards"); @@ -6214,6 +6269,7 @@ diagnose the condition. fprintf(f_debug, "...and jumping to: "); db_cfd_and_parents(label_cfdp); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if UPC_EXTENSIONS_ALLOWED if (label_cfdp->enclosing_forall != goto_cfdp->enclosing_forall) { @@ -6328,10 +6384,12 @@ diagnose the condition. common_parent = common_parent->parent; } /* while */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, " common parent = "); db_cfd(common_parent); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* For forward gotos, start looking for initializing declarations at the point immediately following the outermost block that both contains the @@ -7722,25 +7780,31 @@ Each has the form switch (curr_token) { case tok_upc_notify: #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "UPC notify statement\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ kind = (a_statement_kind)stmk_upc_notify; break; case tok_upc_wait: #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "UPC wait statement\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ kind = (a_statement_kind)stmk_upc_wait; break; case tok_upc_barrier: #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "UPC barrier statement\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ kind = (a_statement_kind)stmk_upc_barrier; break; @@ -8615,6 +8679,7 @@ is being parsed within the context of the __extension__ keyword. } /* if */ remove_stop_token(tok_rbrace); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || (at_function_level && db_flag_is_set("dump_stmts"))) { int how_deep = 3; @@ -8629,6 +8694,7 @@ is being parsed within the context of the __extension__ keyword. } /* if */ db_statement_list(block, /*indent=*/0, "", how_deep); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return block; @@ -8712,6 +8778,7 @@ is in effect a wrapper around compound_statement. add_to_control_flow_descr_list( alloc_control_flow_descr((a_control_flow_descr_kind)cfdk_end_of_block)); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || db_flag_is_set("dump_stmts")) { int how_deep = 3; fputs("terminating compound statement for ", f_debug); @@ -8723,6 +8790,7 @@ is in effect a wrapper around compound_statement. if (debug_level < 3) how_deep = 100; db_statement_list(sp, /*indent=*/0, "", how_deep); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return sp; @@ -8763,6 +8831,7 @@ before the fixup can be done for pointers in goto and label statements. } /* wrapup_control_flow_processing */ #if DEBUG +/* GCOVR_EXCL_START */ unsigned long show_statements_space_used(void) /* @@ -8784,6 +8853,7 @@ Display and return the amount of space used for various statements tables. return (grand_total); } /* show_statements_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void statements_one_time_init(void) @@ -8796,7 +8866,9 @@ One-time initialization for statements.c static variables. STATIC_THREAD a_pch_saved_variable saved_vars[] = { pch_saved_var_array_elem(avail_control_flow_descrs), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_control_flow_descrs_allocated), +/* GCOVR_EXCL_STOP */ #endif /* if DEBUG */ pch_saved_var_array_terminating_elem() }; @@ -8851,8 +8923,10 @@ of the front end. { avail_control_flow_descrs = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_control_flow_descrs_allocated = 0; cfd_id_number = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* statements_init */ diff --git a/src/statements.h b/src/statements.h index 866228e958..962e26b9ff 100644 --- a/src/statements.h +++ b/src/statements.h @@ -85,8 +85,10 @@ typedef struct a_control_flow_descr { kind; /* The kind of entry. */ #if DEBUG +/* GCOVR_EXCL_START */ unsigned long id_number; /* Unique identifying number for this entry. */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if UPC_EXTENSIONS_ALLOWED a_statement_ptr @@ -614,8 +616,10 @@ extern void statements_trans_unit_init(void); extern void statements_init(void); #if DEBUG +/* GCOVR_EXCL_START */ /* Show and return the amount of memory used by statements entries. */ extern unsigned long show_statements_space_used(void); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG*/ /* Conditionally close the "edg" namespace. */ diff --git a/src/symbol_ref.c b/src/symbol_ref.c index 68537f3bb8..4233150b48 100644 --- a/src/symbol_ref.c +++ b/src/symbol_ref.c @@ -31,6 +31,7 @@ symbol_ref.c - Routines to manage references to symbols. BEGIN_EDG_NAMESPACE #if DEBUG +/* GCOVR_EXCL_START */ void db_symbol_ref_kind(a_symbol_reference_kind kind) /* @@ -87,6 +88,7 @@ Output the flags set in kind to the debug output in a human-readable way. } /* if */ } /* db_symbol_ref_kind */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ STATIC_THREAD an_il_to_str_output_control_block @@ -330,6 +332,7 @@ a class template in Microsoft mode. if (hnp->entity.ptr == entity) break; } /* for */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_hidden")) { if (hnp == NULL || ((tag_hidden_by_nontag && @@ -362,6 +365,7 @@ a class template in Microsoft mode. fprintf(f_debug, "\n"); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (hnp == NULL) { /* No existing entry. Allocate a new one. */ @@ -707,6 +711,7 @@ flags cleared. Note that this happens even if no hiding had occurred. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if ((debug_level >= 4 || db_flag_is_set("dump_hidden")) && hnp != NULL) { a_source_correspondence *scp = source_corresp_for_il_entry(hnp->entity.ptr, entity_kind); @@ -724,6 +729,7 @@ flags cleared. Note that this happens even if no hiding had occurred. } /* if */ fprintf(f_debug, "\" can be used as an unqualified name\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* check_name_unhiding */ @@ -798,9 +804,11 @@ due to the simulated injected name of a template instance in Microsoft mode. clear_locator(&locator, &sym_ptr->decl_position); locator.symbol_header = sym_ptr->header; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_hidden")) { fputs(" ...doing lookup (inherited names)\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ (void)normal_id_lookup(&locator, IDL_HIDDEN_NAME_LOOKUP); old_sym_ptr = locator.specific_symbol; @@ -932,6 +940,7 @@ hidden name checking on its own members, too. a_symbol_ptr sym_ptr; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_hidden")) { /* If this is the top-level call, identify class_type. */ if (bcp != NULL && top_level) { @@ -940,6 +949,7 @@ hidden name checking on its own members, too. fputc('\n', f_debug); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Loop through each of the base classes of class type and perform hidden name checking on the inherited members of direct (and, if top-level, @@ -1015,6 +1025,7 @@ hidden name checking on its own members, too. /* Skip constructors. */ if (is_constructor_symbol(sym_ptr)) continue; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_hidden")) { if (sym_ptr->decl_position.seq) { fputs(" Hidden name check: ", f_debug); @@ -1023,6 +1034,7 @@ hidden name checking on its own members, too. fputc('\n', f_debug); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Unhide the injected class names since they can now be accessed using an unqualified name even if that was not so in the base. */ @@ -1158,9 +1170,11 @@ type specifier when put out by the C++-generating back end. An elaborated type specifier can be used to "defeat" the hiding. */ /* Find the innermost tag declaration with the same name. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_hidden")) { fputs(" ...doing tag lookup (tag-nontag)\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ old_sym_ptr = normal_id_lookup(&locator, IDL_HIDDEN_NAME_LOOKUP | IDL_MUST_BE_TAG); @@ -1220,9 +1234,11 @@ C++-generating back end. clear_locator(&locator, &sym_ptr->decl_position); locator.symbol_header = sym_ptr->header; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_hidden")) { fputs(" ...doing skip-curr-scope lookup (qualifiable)\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ old_sym_ptr = normal_id_lookup(&locator, IDL_HIDDEN_NAME_LOOKUP | IDL_SKIP_CURR_SCOPE); @@ -1347,10 +1363,12 @@ C++-generating back end. !is_class_template_symbol(old_sym_ptr)) { clear_specific_symbol(locator); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_hidden")) { fputs(" ...doing skip-curr-scope tag lookup (qualifiable)\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ old_sym_ptr = normal_id_lookup(&locator, IDL_HIDDEN_NAME_LOOKUP | IDL_MUST_BE_TAG | @@ -1424,9 +1442,11 @@ exist). clear_locator(&locator, ¶m_locator->source_position); locator.symbol_header = param_locator->symbol_header; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_hidden")) { fputs(" ...doing skip-curr-scope lookup for parameter\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ old_sym_ptr = normal_id_lookup(&locator, IDL_HIDDEN_NAME_LOOKUP | IDL_SKIP_CURR_SCOPE | @@ -1494,9 +1514,11 @@ resolve ambiguities caused by a using-directive. For example: clear_locator(&locator, &sym_ptr->decl_position); locator.symbol_header = sym_ptr->header; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_hidden")) { fputs(" ...doing lookup (using-directive)\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ (void)normal_id_lookup(&locator, IDL_HIDDEN_NAME_LOOKUP); old_sym_ptr = locator.specific_symbol; @@ -1536,6 +1558,7 @@ specified scope via the specified using_directive. */ { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_hidden")) { if (sym_ptr->decl_position.seq) { fputs("Hidden name check: ", f_debug); @@ -1544,6 +1567,7 @@ specified scope via the specified using_directive. fputc('\n', f_debug); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!is_tag_symbol(sym_ptr) && !is_injected_class_symbol(sym_ptr)) { /* See if the current symbol hides a tag symbol. */ @@ -1862,6 +1886,7 @@ scopes and for the file scope. #endif /* CHECKING */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_hidden")) { if (sym_list != NULL) { fputs("Checking hidden names declared in ", f_debug); @@ -1869,6 +1894,7 @@ scopes and for the file scope. fputs("\n", f_debug); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Traverse the symbols declared in the current scope. */ for (sym = sym_list; sym != NULL; sym = sym->next_in_scope) { diff --git a/src/symbol_tbl.c b/src/symbol_tbl.c index 46142fc5da..a0557d6f0d 100644 --- a/src/symbol_tbl.c +++ b/src/symbol_tbl.c @@ -102,6 +102,7 @@ initialize its variant fields. } /* clear_symbol */ #if DEBUG +/* GCOVR_EXCL_START */ /* Information used to gather performance statistics on the symbol table: */ @@ -155,6 +156,7 @@ STATIC_THREAD unsigned long num_constexpr_if_cache_info_allocated, num_exception_spec_error_descrs_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* @@ -367,6 +369,7 @@ is done according to the output control block octl. #if DEBUG +/* GCOVR_EXCL_START */ #define DEBUG_LINE_LENGTH 79 /* Macros used within db_symbol, referencing local variables defined in that routine. */ @@ -1536,6 +1539,7 @@ Shorthand for db_template_param_list. db_template_param_list(tpp); } /* db_tpp */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void set_source_corresp_name(a_source_correspondence *sc, @@ -1997,7 +2001,9 @@ Allocate a new symbol header, and return a pointer to it. ptr = (a_symbol_header_ptr)alloc_fe(sizeof(a_symbol_header)); #if DEBUG +/* GCOVR_EXCL_START */ num_symbol_headers_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ptr->next = NULL; ptr->identifier = NULL; @@ -2055,7 +2061,9 @@ Allocate a new conversion header and return a pointer to it. db_enter(5, "alloc_conversion_header"); ptr = (a_conversion_header_ptr)alloc_fe(sizeof(a_conversion_header)); #if DEBUG +/* GCOVR_EXCL_START */ num_conversion_headers_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ptr->next = NULL; ptr->symbol_header = NULL; @@ -2083,7 +2091,9 @@ is not needed by make_literal_opname_locator. ptr = (a_literal_operator_header_ptr) alloc_fe(sizeof(a_literal_operator_header)); #if DEBUG +/* GCOVR_EXCL_START */ ++num_literal_operator_headers_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ptr->next = literal_operator_header_list; literal_operator_header_list = ptr; @@ -2106,7 +2116,9 @@ Allocate a new type list entry and return a pointer to it. ptr = (a_substituted_type_list_entry_ptr) alloc_fe(sizeof(a_substituted_type_list_entry)); #if DEBUG +/* GCOVR_EXCL_START */ num_substituted_type_list_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ptr->next = NULL; ptr->templ_arg_list = NULL; @@ -2132,7 +2144,9 @@ Allocate a new symbol list entry and return a pointer to it. /* Allocate a new entry. */ ptr = (a_symbol_list_entry_ptr)alloc_fe(sizeof(a_symbol_list_entry)); #if DEBUG +/* GCOVR_EXCL_START */ num_symbol_list_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ ptr->next = NULL; @@ -2184,7 +2198,9 @@ value such as ). hdr_ptr->identifier_length = length; hdr_ptr->is_unnamed = is_unnamed; #if DEBUG +/* GCOVR_EXCL_START */ symbol_name_string_space += (unsigned long)(length + 1); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* set_identifier_for_symbol_header */ @@ -2233,7 +2249,9 @@ its fields and return a pointer to it. peahlp = alloc_fe_of_type(a_prop_or_event_accessor_header_lookup); #if DEBUG +/* GCOVR_EXCL_START */ num_prop_or_event_accessor_header_lookups_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ clear_prop_or_event_accessor_header_lookup(peahlp); return peahlp; @@ -2330,6 +2348,7 @@ header is returned if one exists. Otherwise, a new header is created. } /* get_property_or_event_accessor_symbol_header */ #if DEBUG +/* GCOVR_EXCL_START */ void db_hide_by_sig_list(a_hide_by_sig_list_entry_ptr hbslep) /* @@ -2357,6 +2376,7 @@ Display a hide-by-sig list, for debugging purposes. } /* if */ } /* db_hide_by_sig_list */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static void free_list_of_hide_by_sig_list_entries( @@ -2395,7 +2415,9 @@ to it. /* Allocate a new entry. */ hbslep = alloc_fe_of_type(a_hide_by_sig_list_entry); #if DEBUG +/* GCOVR_EXCL_START */ num_hide_by_sig_list_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ hbslep->next = NULL; @@ -2745,9 +2767,11 @@ static method. The list is returned in *p_hide_by_sig_list. sym->hide_by_sig_lookup_done = TRUE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("hbs")) { db_hide_by_sig_list(result_list); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Return the list if a pointer to the list pointer was provided by the caller. */ @@ -2773,7 +2797,9 @@ Allocate a new type list entry and return a pointer to it. /* Allocate a new entry. */ ptr = (a_type_list_entry_ptr)alloc_fe(sizeof(a_type_list_entry)); #if DEBUG +/* GCOVR_EXCL_START */ num_type_list_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ ptr->next = NULL; @@ -2803,6 +2829,7 @@ be NULL, in which case nothing is done. } /* free_list_of_type_list_entries */ #if DEBUG +/* GCOVR_EXCL_START */ void db_type_entries(a_type_list_entry_ptr tlep, int indent = 0) @@ -2821,6 +2848,7 @@ db_type_list because that name was in use already.) } /* for */ } /* db_type_entries */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ a_symbol_ptr find_symbol(a_const_char *identifier, @@ -2845,7 +2873,9 @@ caller may have to set it directly. db_enter(4, "find_symbol"); #if DEBUG +/* GCOVR_EXCL_START */ num_searches_for_symbols++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Hash the symbol's identifier. This is not a particularly strong hash, @@ -2862,7 +2892,9 @@ caller may have to set it directly. prev_hdr_ptr = NULL; do { #if DEBUG +/* GCOVR_EXCL_START */ num_compares_for_symbols++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (length == hdr_ptr->identifier_length) { /*lint -e{670}*/ @@ -2887,13 +2919,17 @@ caller may have to set it directly. allocate a symbol header for it. */ hdr_ptr = alloc_symbol_header(); #if DEBUG +/* GCOVR_EXCL_START */ num_symbol_headers_in_hash_table++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Link the new header onto the front of the appropriate bucket of the symbol table. */ #if DEBUG +/* GCOVR_EXCL_START */ if (symbol_table[bucket_number] == NULL) num_used_symbol_buckets++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ hdr_ptr->next = symbol_table[bucket_number]; symbol_table[bucket_number] = hdr_ptr; @@ -3055,7 +3091,9 @@ Allocate a namespace list entry and return a pointer to it. /* Allocate a new entry. */ ptr = (a_namespace_list_entry_ptr)alloc_fe(sizeof(a_namespace_list_entry)); #if DEBUG +/* GCOVR_EXCL_START */ num_namespace_list_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ ptr->next = NULL; @@ -3354,7 +3392,9 @@ fields, and return a pointer to it. new (&oocpsp->cache) a_template_cache(); clear_template_cache(&oocpsp->cache); #if DEBUG +/* GCOVR_EXCL_START */ num_out_of_class_partial_specs_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return oocpsp; @@ -3378,7 +3418,9 @@ fields, and return a pointer to it. Reuse a freed entry if possible. /* Allocate a template declaration information entry. */ tdip = (a_template_decl_info_ptr)alloc_fe(sizeof(a_template_decl_info)); #if DEBUG +/* GCOVR_EXCL_START */ num_template_decl_info_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ tdip->parameters = NULL; @@ -3424,7 +3466,9 @@ fields, and return a pointer to it. tsxp->token_sequence_number = NO_TOKEN_SEQUENCE_NUMBER; tsxp->entry = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_token_sequence_xrefs_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return tsxp; } /* alloc_token_sequence_xref */ @@ -3438,7 +3482,9 @@ fields, and return a pointer to it. { a_constexpr_if_cache_info_ptr cicip = new_fe(); #if DEBUG +/* GCOVR_EXCL_START */ num_constexpr_if_cache_info_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return cicip; } /* alloc_constexpr_if_cache_info */ @@ -3462,7 +3508,9 @@ fields, and return a pointer to it. ndcip->symbol = NULL; ndcip->reversed_opnds = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ num_nondependent_call_info_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return ndcip; } /* alloc_nondependent_call_info */ @@ -3541,6 +3589,7 @@ position disambiguator on tsn if non-zero. ssep->next_nondependent_call = list_ptr; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("nondep_call")) { fprintf(f_debug, "Searching for nondependent call at %ld", (long)tsn); if (depth != 0) { @@ -3553,6 +3602,7 @@ position disambiguator on tsn if non-zero. fprintf(f_debug, "\n"); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return result; } /* get_nondependent_call_info */ @@ -3584,6 +3634,7 @@ implicit reversal of operands. current context. */ tdip = get_specified_template_decl_info(/*innermost=*/TRUE); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("nondep_call")) { fprintf(f_debug, "Recording nondependent call at %ld ", (long)tsn); if (depth != 0) { @@ -3593,6 +3644,7 @@ implicit reversal of operands. if (symbol != NULL) db_symbol_name(symbol); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Create a nondependent call entry. */ ndcip = alloc_nondependent_call_info(); @@ -3679,7 +3731,9 @@ and return a pointer to it. tfip->symbol = NULL; tfip->token_number = NO_TOKEN_SEQUENCE_NUMBER; #if DEBUG +/* GCOVR_EXCL_START */ num_templ_friend_info_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return tfip; } /* alloc_templ_friend_info */ @@ -3708,7 +3762,9 @@ return a pointer to it. nssp->visited_by_qualified_lookup = FALSE; nssp->within_unnamed_namespace = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ num_namespace_symbol_supplements_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ clear_scope_pointers_block(&nssp->pointers_block); @@ -3756,7 +3812,9 @@ and return a pointer to it. tssp = (a_template_symbol_supplement_ptr) alloc_fe(sizeof(a_template_symbol_supplement)); #if DEBUG +/* GCOVR_EXCL_START */ num_template_symbol_supplements_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Initialize its fields. */ tssp->pending_instantiations = 0; @@ -3926,7 +3984,9 @@ null. (Used for C++/CLI properties.) psssp = (a_property_set_symbol_supplement_ptr) alloc_fe(sizeof(a_property_set_symbol_supplement)); #if DEBUG +/* GCOVR_EXCL_START */ num_property_set_symbol_supplements_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Initialize its fields. */ psssp->properties = NULL; @@ -3951,7 +4011,9 @@ This function should normally only be called through the macro get_sdm_supp. new (&sdmsp->token_cache) a_shared_token_cache(); sdmsp->prototype_member = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_static_data_member_supplements_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ sdm_sym->variant.static_data_member.extra_info = sdmsp; return sdmsp; @@ -3996,7 +4058,9 @@ state. essp = (an_enum_symbol_supplement_ptr)alloc_fe( sizeof(an_enum_symbol_supplement)); #if DEBUG +/* GCOVR_EXCL_START */ num_enum_symbol_supplements_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ sym_ptr->variant.enumeration.extra_info = essp; essp->dependent_type_fixup_list = NULL; @@ -4020,7 +4084,9 @@ state. cssp = (a_class_symbol_supplement_ptr)alloc_fe( sizeof(a_class_symbol_supplement)); #if DEBUG +/* GCOVR_EXCL_START */ num_class_symbol_supplements_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ sym_ptr->variant.class_struct_union.extra_info = cssp; /* Note: Some of the fields cleared below must also be cleared in @@ -4175,7 +4241,9 @@ state. fssp->is_first_variant_member = FALSE; fssp->is_last_variant_member = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ num_field_symbol_supplements_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ sym_ptr->variant.field.extra_info = fssp; } @@ -4196,7 +4264,9 @@ state. esdp = (an_extern_symbol_descr_ptr)alloc_fe( sizeof(an_extern_symbol_descr)); #if DEBUG +/* GCOVR_EXCL_START */ num_extern_symbol_descrs_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ sym_ptr->variant.extern_symbol_descr = esdp; esdp->type = NULL; @@ -4213,7 +4283,9 @@ state. { a_projection_descr *pdp; pdp = (a_projection_descr_ptr)alloc_fe(sizeof(a_projection_descr)); #if DEBUG +/* GCOVR_EXCL_START */ num_projection_descrs_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pdp->fundamental_symbol = NULL; pdp->fundamental_base_class = NULL; @@ -4348,7 +4420,9 @@ hdr_ptr == NULL indicates that an error symbol should be constructed. sym_ptr = (a_symbol_ptr)alloc_fe(sizeof(a_symbol)); #if DEBUG +/* GCOVR_EXCL_START */ num_symbols_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if EXPENSIVE_CHECKING /* Add the symbol to the list of allocated symbols to check. */ @@ -4442,9 +4516,11 @@ Remove a symbol from the symbol table, i.e., unlink it from either the main #if CHECKING if (ptr == NULL) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level > 0) { fprintf(f_debug, "Symbol name = %s\n", hdr_ptr->identifier); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error( "unlink_symbol_from_symbol_table: cannot find symbol entry"); @@ -4534,7 +4610,9 @@ return a pointer to it. shlep = alloc_fe_of_type(a_symbol_header_lookup_entry); #if DEBUG +/* GCOVR_EXCL_START */ num_symbol_header_lookup_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ clear_symbol_header_lookup_entry(shlep); return shlep; @@ -4608,8 +4686,10 @@ created if needed. break; default: #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "Bad scope kind:\n"); (void)db_scope_kind(kind); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str("is_scope_kind_with_lookup_table"); break; @@ -4647,9 +4727,11 @@ Remove the given symbol from the list of symbols for its scope. #if CHECKING if (ssep == &scope_stack[0]) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level > 0) { fprintf(f_debug, "Symbol name = %s\n", sym_ptr->header->identifier); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("remove_symbol_from_scope_list: bad scope"); } /* if */ @@ -5402,9 +5484,11 @@ Add the given symbol to its symbol header's inactive list. a_symbol_header_ptr sym_hdr = sym_ptr->header; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { db_symbol(sym_ptr, "add_symbol_to_inactive_list: ", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_assertion_str(sym_ptr->kind != (a_symbol_kind)sk_extern_variable && sym_ptr->kind != (a_symbol_kind)sk_extern_routine, @@ -5953,6 +6037,7 @@ found, or NULL if no entry is found. tsxp = *p_tsxp; result = (a_constexpr_if_cache_info_ptr)tsxp->entry; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ccicht")) { fprintf(f_debug, "Found constexpr_if cache tsn=%lu, else=%lu, ending=%lu\n", @@ -5960,6 +6045,7 @@ found, or NULL if no entry is found. (unsigned long)result->else_start_tsn, (unsigned long)result->end_start_tsn); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -6031,8 +6117,10 @@ it. case sck_class_reactivation: size=5; break; default: #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "Bad scope kind:\n"); (void)db_scope_kind(kind); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str("create_name_lookup_table"); break; @@ -7924,7 +8012,9 @@ is none, create a new one. name.length()); ((char*)sym_hdr->identifier)[sym_hdr->identifier_length] = '\0'; #if DEBUG +/* GCOVR_EXCL_START */ symbol_name_string_space += (unsigned long)(sym_hdr->identifier_length); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ return conv_hdr->symbol_header; @@ -11329,7 +11419,9 @@ Allocate a new alternate name entry and return a pointer to it. ptr = (an_ms_attr_alt_name_entry_ptr)alloc_fe( sizeof(an_ms_attr_alt_name_entry)); #if DEBUG +/* GCOVR_EXCL_START */ num_ms_attr_alt_name_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ptr->next = NULL; ptr->original_header = NULL; @@ -11387,7 +11479,9 @@ is none, create a new one. /* Terminate the string. */ alternate_name[length] = '\0'; #if DEBUG +/* GCOVR_EXCL_START */ symbol_name_string_space += (unsigned long)(length + 1); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Find the symbol header for the alternate name. */ clear_locator(&locator, &null_source_position); @@ -11464,7 +11558,9 @@ used for C++ constructs like "operator+". Use pos as the source position. opstr); hdr_ptr->variant.opname = opname; #if DEBUG +/* GCOVR_EXCL_START */ symbol_name_string_space += (unsigned long)(opname_length + 1); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ locator->symbol_header = hdr_ptr; @@ -11512,7 +11608,9 @@ ud_suffix (of length ud_suffix_len). Use pos as the source position sym_hdr_ptr->identifier = str; lo_hdr_ptr->symbol_header = sym_hdr_ptr; #if DEBUG +/* GCOVR_EXCL_START */ symbol_name_string_space += (unsigned long)(len + 1); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (*ud_suffix != '_') { /* ud-suffixes that do not begin with "_" are reserved. */ @@ -12118,6 +12216,7 @@ next_delete_symbol:; } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { db_symbol(op_new_sym, "operator new is: ", 2); if (class_type != NULL) { @@ -12132,6 +12231,7 @@ next_delete_symbol:; "corresponding operator delete is: ", 2); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return corresp_op_delete_sym; @@ -13013,6 +13113,7 @@ FALSE. } /* is_symbol_currently_lookup_visible */ #if DEBUG +/* GCOVR_EXCL_START */ char *db_canonical_ptr_for_symbol(a_symbol_ptr sym_ptr) /* @@ -13029,6 +13130,7 @@ with the IL entry; otherwise return NULL. } /* if */ return entity_ptr; } /* db_canonical_ptr_for_symbol */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -14398,7 +14500,9 @@ Allocate an access error description entry. Reuse a freed entry if possible. /* Allocate a new entry. */ aedp = (an_access_error_descr_ptr)alloc_fe(sizeof(an_access_error_descr)); #if DEBUG +/* GCOVR_EXCL_START */ num_access_error_descrs_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ aedp->next = NULL; @@ -15284,7 +15388,9 @@ Allocate a progenitor entry, initialize its fields, and return a pointer to it. /* Nothing on the available list to use. */ pp = (a_progenitor_ptr)alloc_fe(sizeof(a_progenitor)); #if DEBUG +/* GCOVR_EXCL_START */ num_progenitors_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { /* Use the entry that heads the available list. */ @@ -15363,11 +15469,13 @@ the lookup should consider C++/CLI interface classes. db_enter(4, "find_progenitor_in_base_class"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "looking for \"%s\" in base class \"%s\"\n", locator->symbol_header->identifier, base_type->source_corresp.name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* First look in the scope of the base class itself. */ scope = base_type->variant.class_struct_union.extra_info->assoc_scope; @@ -15445,7 +15553,9 @@ the lookup should consider C++/CLI interface classes. if (sym != NULL) { /* Found in the base class itself. */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) db_symbol(sym, "found: ", 2); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ progenitor = alloc_progenitor(); progenitor->sym = sym; @@ -16325,12 +16435,14 @@ created if a projected symbol cannot be found in any of the real bases. db_enter(4, "find_projected_symbol"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "looking for projection of \"%s\" into class \"%s\"\n", locator->symbol_header->identifier, class_ptr->source_corresp.name != NULL ? class_ptr->source_corresp.name : ""); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ class_sym = (a_symbol_ptr)class_ptr->source_corresp.assoc_info; cssp = class_sym->variant.class_struct_union.extra_info; @@ -16457,10 +16569,12 @@ created if a projected symbol cannot be found in any of the real bases. #if CHECKING if (ssep == &scope_stack[0]) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level > 0) { fprintf(f_debug, "symbol name = %s\n", new_sym->header->identifier); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("find_projected_symbol: bad scope"); } /* if */ @@ -16473,7 +16587,9 @@ created if a projected symbol cannot be found in any of the real bases. add_symbol_to_lookup_table(new_sym, cssp->pointers_block.lookup_table); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) db_symbol(new_sym, "symbol created: ", 2); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ check_assertion(path != NULL); @@ -16508,7 +16624,9 @@ fixup entry to the end of the vla_fixup_list of the current scope stack entry. } else { vfp = (a_vla_fixup_ptr)alloc_fe(sizeof(a_vla_fixup)); #if DEBUG +/* GCOVR_EXCL_START */ num_vla_fixups_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ #if CHECKING @@ -16583,7 +16701,9 @@ should act like a stack if the same entity has several fixups). ptr = (an_extern_type_fixup_ptr)alloc_fe(sizeof(an_extern_type_fixup)); #if DEBUG +/* GCOVR_EXCL_START */ num_extern_type_fixups_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ ptr->next = scope_stack[depth_scope_stack].extern_type_fixup_list; ptr->type = NULL; @@ -16614,7 +16734,9 @@ locator_for_curr_id. /* Allocate a new entry. */ pip = (a_param_id_ptr)alloc_fe(sizeof(a_param_id)); #if DEBUG +/* GCOVR_EXCL_START */ num_param_ids_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Set the entry's fields to default values. */ @@ -16843,7 +16965,9 @@ incomplete type the diagnostic is associated with. esedp = (an_exception_spec_error_descr_ptr)alloc_fe( sizeof(an_exception_spec_error_descr)); #if DEBUG +/* GCOVR_EXCL_START */ num_exception_spec_error_descrs_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ esedp->next = NULL; esedp->position = *pos; @@ -16983,7 +17107,9 @@ defined. dtfp = (a_dependent_type_fixup_ptr)alloc_fe( sizeof(a_dependent_type_fixup)); #if DEBUG +/* GCOVR_EXCL_START */ num_dependent_type_fixups_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ dtfp->fixup_kind = fixup_kind; @@ -17280,6 +17406,7 @@ of the class. } /* for */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5 || db_flag_is_set("operator_namespaces")) { a_namespace_list_entry_ptr nlep = cssp->operator_lookup_namespaces; fprintf(f_debug, "operator namespaces for class: "); @@ -17295,6 +17422,7 @@ of the class. fprintf(f_debug, "\n"); } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* determine_operator_lookup_namespaces */ @@ -17449,7 +17577,9 @@ and return a pointer to it. db_enter(5, "alloc_template_param"); ptr = (a_template_param_ptr)alloc_fe(sizeof(a_template_param)); #if DEBUG +/* GCOVR_EXCL_START */ num_template_params_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_assertion(sym != NULL); ptr->next = NULL; @@ -17497,7 +17627,9 @@ pointer to it. mip = (a_master_instance_ptr)alloc_fe(sizeof(a_master_instance)); #if DEBUG +/* GCOVR_EXCL_START */ num_master_instances_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ mip->next = NULL; mip->instance = NULL; @@ -17521,7 +17653,9 @@ Allocate a new function instantiation entry and return a pointer to it. db_enter(5, "alloc_template_instance"); tip = (a_template_instance_ptr)alloc_fe(sizeof(a_template_instance)); #if DEBUG +/* GCOVR_EXCL_START */ num_template_instances_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ tip->next = NULL; tip->next_in_instantiation_list = NULL; @@ -18176,7 +18310,9 @@ Allocate a new saved macro state entry and return a pointer to it. /* Allocate a new entry. */ smsp = alloc_fe_of_type(a_saved_macro_state); #if DEBUG +/* GCOVR_EXCL_START */ num_saved_macro_states_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ smsp->next = NULL; @@ -18438,7 +18574,9 @@ allocated or NO_MEMORY_REGION_NUMBER if general memory should be used. htep->next = NULL; htep->data = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_hash_table_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return htep; } /* alloc_hash_table_entry */ @@ -18478,8 +18616,10 @@ value with an element of the table. alloc_general_or_in_region(memory_region, table_size_in_bytes); memzero((a_void_ptr)htp->table, size_t_arg(table_size_in_bytes)); #if DEBUG +/* GCOVR_EXCL_START */ num_hash_tables_allocated++; total_hash_table_size += (unsigned long)table_size_in_bytes; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return htp; } /* alloc_hash_table */ @@ -18505,11 +18645,13 @@ holds. Allocate a larger table and rehash the existing entries. alloc_general_or_in_region(htp->memory_region, table_size_in_bytes); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("hash")) { fprintf(f_debug, "Resizing hash table at %p, old_size=%lu, new_size=%lu\n", (void*)htp, (unsigned long)htp->num_buckets, (unsigned long)new_buckets); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ memzero((a_void_ptr)new_table, size_t_arg(table_size_in_bytes)); old_table_size_in_bytes = sizeof(a_hash_table_entry_ptr) * @@ -18534,8 +18676,10 @@ holds. Allocate a larger table and rehash the existing entries. } /* if */ htp->table = new_table; #if DEBUG +/* GCOVR_EXCL_START */ total_hash_table_size += (unsigned long)(table_size_in_bytes - old_table_size_in_bytes); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* resize_hash_table */ @@ -18601,6 +18745,7 @@ appropriate user-defined entry. } /* hash_find */ #if DEBUG +/* GCOVR_EXCL_START */ void db_hash_statistics(a_hash_table_ptr table) /* @@ -18639,6 +18784,7 @@ Display statistics about a hash table. } /* for */ } /* db_hash_statistics */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ a_hash_value hash_source_string(a_void_ptr key) @@ -18672,6 +18818,7 @@ a special version of the message that refers to the global namespace. } /* namespace_has_no_actual_member_error */ #if DEBUG +/* GCOVR_EXCL_START */ unsigned long show_symbol_space_used(void) /* @@ -18837,6 +18984,7 @@ for space tracking purposes. } /* show_symbol_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -20152,6 +20300,7 @@ are handled in symbol_tbl_init.) pch_saved_var_array_elem(next_named_register_id), #endif /* NAMED_REGISTERS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_access_error_descrs_allocated), pch_saved_var_array_elem(num_active_using_directives_allocated), pch_saved_var_array_elem(num_generated_entity_blocks_allocated), @@ -20201,6 +20350,7 @@ are handled in symbol_tbl_init.) num_prop_or_event_accessor_header_lookups_allocated), pch_saved_var_array_elem(num_ms_attr_alt_name_entries_allocated), #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ +/* GCOVR_EXCL_STOP */ #endif /* if DEBUG */ pch_saved_var_array_elem(inst_counters), pch_saved_var_array_terminating_elem() @@ -20378,6 +20528,7 @@ of the front end. dummy_undefined_symbol = NULL; sb_counter = 0; #if DEBUG +/* GCOVR_EXCL_START */ num_symbols_allocated = 0; num_symbol_headers_allocated = 0; num_symbol_headers_in_hash_table = 0; @@ -20431,6 +20582,7 @@ of the front end. = 0; num_ms_attr_alt_name_entries_allocated = 0; #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ inst_counters = alloc_fe_of_type(Dyn_array); construct(inst_counters, /*cap=*/256u); @@ -20508,6 +20660,7 @@ unit. a_memory_region_number prefix_region = prefix->file_scope_region_number; if (sym_tu_region != prefix_region) { #if DEBUG +/* GCOVR_EXCL_START */ fputs("the following symbol:\n ", f_debug); db_symbol(sym, "", 6); @@ -20516,6 +20669,7 @@ unit. "actually allocated in the TU correspoding to ", prefix_region); print(err_msg, f_debug); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ any_errors = TRUE; } /* if */ diff --git a/src/symbol_tbl.h b/src/symbol_tbl.h index 8b96e4a8f2..6a77a9efbf 100644 --- a/src/symbol_tbl.h +++ b/src/symbol_tbl.h @@ -7767,6 +7767,7 @@ EXTERN_THREAD unsigned extern void show_top_templates(unsigned n); #if DEBUG +/* GCOVR_EXCL_START */ /* Show and return the amount of memory used by symbol table entries. */ extern unsigned long show_symbol_space_used(void); @@ -7805,6 +7806,7 @@ EXTERN_THREAD unsigned long num_slow_id_lookups, num_active_using_directives_allocated, num_generated_entity_blocks_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ extern a_symbol_ptr f_class_template_for_type(a_type_ptr type); @@ -7958,7 +7960,9 @@ extern a_hash_data_ptr *hash_find(a_hash_table_ptr table, a_boolean create); #if DEBUG +/* GCOVR_EXCL_START */ void db_hash_statistics(a_hash_table_ptr table); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ extern a_hash_value hash_source_string(a_void_ptr key); diff --git a/src/sys_predef.c b/src/sys_predef.c index f07b9d8d70..debb0b7b07 100644 --- a/src/sys_predef.c +++ b/src/sys_predef.c @@ -653,6 +653,7 @@ function. sym->variant.routine.ptr->variant.builtin_function_kind = kind; sym->variant.routine.ptr->is_consteval = is_consteval_builtin(kind); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_builtins")) { /* Dump builtin function declarations. */ an_il_to_str_output_control_block octl; @@ -667,6 +668,7 @@ function. FTO_NO_OPTIONS, &octl); fprintf(f_debug, ";\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return sym; } /* enter_builtin_function */ diff --git a/src/templates.c b/src/templates.c index a3a732d79d..d7702c0052 100644 --- a/src/templates.c +++ b/src/templates.c @@ -455,6 +455,7 @@ STATIC_THREAD unsigned long that are in progress at any point in time. */ #if DEBUG +/* GCOVR_EXCL_START */ /* Counters used to track memory usage. */ @@ -469,6 +470,7 @@ STATIC_THREAD unsigned long num_tmpl_decl_states_allocated, num_variadic_param_infos_allocated, num_partial_order_candidates_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Forward declarations. */ @@ -633,7 +635,9 @@ a pointer to it. /* Allocate a new entry. */ vpip = alloc_fe_of_type(a_variadic_param_info); #if DEBUG +/* GCOVR_EXCL_START */ num_variadic_param_infos_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ vpip->next = NULL; @@ -686,7 +690,9 @@ and return a pointer to it. pscp = (a_partial_order_candidate_ptr) alloc_fe(sizeof(a_partial_order_candidate)); #if DEBUG +/* GCOVR_EXCL_START */ num_partial_order_candidates_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ pscp->next = NULL; @@ -758,11 +764,13 @@ the "text" field of *template_ptr to point to it. be copied. */ template_ptr->text = make_copy_of_token_string(); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3 || (db_active && db_flag_is_set("dump_template_strings"))) { /* This won't work if the string contains nulls -- is it worth fixing? */ fprintf(f_debug, "Saved template string:\n%s\n", template_ptr->text); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); @@ -794,10 +802,12 @@ the string in the IL template entry associated with the member function. /* Copy the string into IL memory. */ template_ptr->text = make_copy_of_token_string(); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("dump_template_strings")) { /* This won't work properly if the string contains nulls. */ fprintf(f_debug, "Saved template string:\n%s\n", template_ptr->text); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* make_member_function_template_string */ @@ -984,10 +994,12 @@ Open the template information file. check_assertion_str2(generate_template_files(), "open_template_info_file:", "generate_template_files() is FALSE"); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ti_file")) { fprintf(f_debug, "Opening template_info_file %s\n", template_info_file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Open a file in which the list of generated file names will be returned. */ @@ -1057,10 +1069,12 @@ already exists. if (is_regular_file(template_info_file_name)) { delete_file(template_info_file_name); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ti_file")) { fprintf(f_debug, "Deleting template info file %s\n", template_info_file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* if */ @@ -3939,6 +3953,7 @@ CFT_ENTIRE_TYPE flag is FALSE. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("cft")) { fprintf(f_debug, "compare_function_template:\n"); db_symbol(templ_sym1, " template1: ", 2); @@ -3948,6 +3963,7 @@ CFT_ENTIRE_TYPE flag is FALSE. : (result == 1 ? "more specialized" : "less specialized")); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return result; } /* compare_function_templates */ @@ -4231,6 +4247,7 @@ determine the partial order among matching partial specializations. free_template_arg_list(*ps_arg_list); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("partial_ord")) { fprintf(f_debug, "mpp match=%d\n", result); fprintf(f_debug, "mpp instance: \n"); @@ -4239,6 +4256,7 @@ determine the partial order among matching partial specializations. db_symbol(template_sym, "", 2); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /*lint --e{438} for spurious "last value assigned to local_arg_list not used (LINTBUG). */ @@ -4380,6 +4398,7 @@ templates being ordered are class or variable template partial specializations. new_is_more_specialized = result == 1; curr_is_more_specialized = result == -1; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("partial_ord")) { fprintf(f_debug, "atpoc: comparing\n sym_1:"); db_symbol_name(fund_curr_sym); @@ -4404,6 +4423,7 @@ templates being ordered are class or variable template partial specializations. fprintf(f_debug, " sym_2 more specialized: %d\n", new_is_more_specialized); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (new_is_more_specialized && !curr_is_more_specialized) { /* The new entry is more specialized than the one already on the @@ -4435,10 +4455,12 @@ templates being ordered are class or variable template partial specializations. new_pscp->next = *psc_list; *psc_list = new_pscp; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("partial_ord")) { fprintf(f_debug, "atpoc: adding: \n"); db_symbol(new_sym, "", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { /* If we are not adding the entry to the list, free the template @@ -4493,10 +4515,12 @@ p_ambiguous is non-NULL. prev_pscp->next = next_pscp; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("partial_ord")) { fprintf(f_debug, "Removing partial ord because of decl_seq:\n"); db_symbol(pscp->symbol, "", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Free the entry. This also frees the template argument list. */ free_partial_order_candidate(pscp); @@ -4583,10 +4607,12 @@ ambiguous, set *p_subst_error = TRUE and inhibit the ambiguity diagnostic. /*no_diagnostics=*/p_subst_error != NULL); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("partial_ord") && matching_sym != NULL) { fprintf(f_debug, "Partial specialization result is: \n"); db_symbol(matching_sym, "", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return matching_sym; @@ -5062,6 +5088,7 @@ Instantiate the C++/CLI generic delegate specified by class_type. add_to_types_list(class_type, NO_SCOPE_DEPTH); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", instance_sym)) { fprintf(f_debug, "Instantiation of delegate: "); db_symbol_name_trans_unit(instance_sym); @@ -5071,6 +5098,7 @@ Instantiate the C++/CLI generic delegate specified by class_type. db_type(class_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Call a routine that manages the correspondence of entities between translation units to notify it of the new instance. */ @@ -5470,6 +5498,7 @@ be completed here. ctsp = class_type->variant.class_struct_union.extra_info; ctsp->assoc_template = tssp_of_prototype->il_template_entry; #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", instance_sym)) { fprintf(f_debug, "Beginning full instantiation of: "); db_symbol_name_trans_unit(instance_sym); @@ -5477,6 +5506,7 @@ be completed here. db_symbol_name_trans_unit(template_sym); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Find the outermost enclosing class type. The template arguments are associated with this class type. */ @@ -5546,11 +5576,13 @@ be completed here. #if GENERATE_SOURCE_SEQUENCE_LISTS #if CLASS_TEMPLATE_INSTANTIATIONS_IN_SOURCE_SEQUENCE_LISTS #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("full instantiation of \"", f_debug); db_type_name(class_type); fputs("\":\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #endif /* CLASS_TEMPLATE_INSTANTIATIONS_IN_SOURCE_SEQUENCE_LISTS */ #endif /* GENERATE_SOURCE_SEQUENCE_LISTS */ @@ -5737,6 +5769,7 @@ using an_owned_template_cache_segment_ptr = segments. */ #if DEBUG +/* GCOVR_EXCL_START */ void db_template_cache_segments( const a_template_cache_segment_list &cache_segments) @@ -5758,6 +5791,7 @@ Display the contents of list of template cache segment entries. } /* for */ } /* db_template_cache_segments */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ static INLINE void remove_body_from_cache( @@ -5986,7 +6020,9 @@ and a list of the unprocessed entries is returned to the caller. &before_first_token_it, &last_token_it); #if DEBUG +/* GCOVR_EXCL_START */ a_boolean removed = FALSE; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (tcsp->is_friend) { /* Do nothing: friend function bodies are not removed from the @@ -6004,7 +6040,9 @@ and a list of the unprocessed entries is returned to the caller. before_first_token_it, last_token_it); #if DEBUG +/* GCOVR_EXCL_START */ removed = TRUE; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } else if (tcsp->is_exception_specification_arg) { @@ -6018,7 +6056,9 @@ and a list of the unprocessed entries is returned to the caller. last_token_it); #if DEBUG +/* GCOVR_EXCL_START */ removed = TRUE; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } else { @@ -6047,7 +6087,9 @@ and a list of the unprocessed entries is returned to the caller. #endif /* RECORD_TEMPLATE_STRINGS */ } #if DEBUG +/* GCOVR_EXCL_START */ removed = TRUE; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ break; case sk_class_or_struct_tag: @@ -6074,7 +6116,9 @@ and a list of the unprocessed entries is returned to the caller. *cache_segments, new_cache.ptr()); #if DEBUG +/* GCOVR_EXCL_START */ removed = TRUE; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ break; @@ -6086,7 +6130,9 @@ and a list of the unprocessed entries is returned to the caller. before_first_token_it, last_token_it); #if DEBUG +/* GCOVR_EXCL_START */ removed = TRUE; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ break; default: @@ -6094,11 +6140,13 @@ and a list of the unprocessed entries is returned to the caller. } /* switch */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (removed && db_flag_is_set("emb")) { fprintf(f_debug, "extract_member_bodies: removed "); db_symbol_name(tcsp->symbol); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ db_exit(); @@ -6155,11 +6203,13 @@ is populated. }; #endif /* CHECKING */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", template_sym)) { fprintf(f_debug, "Prototype instantiation of: "); db_symbol_name_trans_unit(template_sym); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Update the type_kind of the instance with the type_kind from the template. Ordinarily, this will have already been done when the @@ -6491,12 +6541,14 @@ user later during real instantiations. db_enter(3, "default_arg_prototype_instantiation"); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("def_arg_proto")) { for (daefp = def_arg_list; daefp != NULL; daefp = daefp->next) { fprintf(f_debug, "prototype instantiation of default arg:\n"); db_token_cache(daefp->cache.tokens.ptr(), "default arg"); } /* for */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ tssp = template_supplement_for_symbol(template_sym); rout_ptr = tssp->variant.function.routine; @@ -7430,6 +7482,7 @@ cases). goto done; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", rout_sym)) { fprintf(f_debug, "instantiating: "); db_symbol_name_trans_unit(rout_sym); @@ -7437,6 +7490,7 @@ cases). db_symbol_name_trans_unit(template_sym); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (func_info_ptr->is_inline) { set_inline_flag(rout_ptr, TRUE); @@ -7527,11 +7581,13 @@ cases). #if GENERATE_SOURCE_SEQUENCE_LISTS #if TEMPLATE_INSTANTIATIONS_IN_SOURCE_SEQUENCE_LISTS #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("full instantiation of \"", f_debug); db_name(&rout_ptr->source_corresp); fputs("\":\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (entity_cannot_be_specialized(rout_sym)) { /* A template function that cannot be specialized: Avoid generating source @@ -8636,6 +8692,7 @@ the same constant. if (arg1 != NULL || arg2 != NULL) equiv = FALSE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("eta")) { fprintf(f_debug, "equiv_template_arg_lists is %s for :\n", equiv ? "TRUE" : "FALSE"); @@ -8645,6 +8702,7 @@ the same constant. db_template_arg_list(list2); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return equiv; @@ -10035,10 +10093,12 @@ argument list for the instantiation to be found. ikp = (an_instantiation_key_ptr)key; value = (a_hash_value)hash_template_arg_list(ikp->template_arg_list); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("hash_instantiation")) { db_template_arg_list(ikp->template_arg_list); fprintf(f_debug, ": %lu\n", (unsigned long)value); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return value; } /* hash_instantiation */ @@ -10402,12 +10462,14 @@ argument lists. eta_options | ETA_EXACT_MATCH_REQUIRED)) { /* We've found a match. */ #if DEBUG +/* GCOVR_EXCL_START */ fprintf(f_debug, "check_new_class_instantiation:\n"); fprintf(f_debug, " existing list: "); db_template_arg_list(old_list); fprintf(f_debug, "\n new list: "); db_template_arg_list(template_arg_list); fprintf(f_debug, "\n"); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition(); } /* if */ @@ -10779,12 +10841,14 @@ a type in certain ways (see template_arg_list_is_dependent). #endif /* GENERATE_SOURCE_SEQUENCE_LISTS */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("cpioc") || db_flag_is_set("dump_ss_full")) { fputs("partial instantiation of \"", f_debug); db_type_name(class_type); fputs("\":\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (class_template_sym == symbol_for_std_initializer_list) { ctsp->is_initializer_list = TRUE; @@ -10812,6 +10876,7 @@ a type in certain ways (see template_arg_list_is_dependent). } /* if */ #endif /* GNU_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", sym)) { fprintf(f_debug, "Partial instantiation of: "); db_symbol_name_trans_unit(sym); @@ -10822,6 +10887,7 @@ a type in certain ways (see template_arg_list_is_dependent). : "FALSE"); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Call a routine that manages the correspondence of entities between translation units to notify it of the new instance. */ @@ -11281,6 +11347,7 @@ error type is used. add_to_types_list(type, NO_SCOPE_DEPTH); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", instance_sym)) { fprintf(f_debug, "Instantiation of alias: "); db_symbol_name_trans_unit(instance_sym); @@ -11291,6 +11358,7 @@ error type is used. fprintf(f_debug, " nonreal=%s\n", type->variant.typeref.is_nonreal ? "TRUE" : "FALSE"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Call a routine that manages the correspondence of entities between translation units to notify it of the new instance. */ @@ -11478,6 +11546,7 @@ template. #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", instance_sym)) { fprintf(f_debug, "Instantiation of enum: "); db_symbol_name_trans_unit(instance_sym); @@ -11487,6 +11556,7 @@ template. db_type(enum_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* If the translation unit stack was pushed above, pop it now. */ if (trans_unit_pushed) pop_translation_unit_stack(); @@ -12100,6 +12170,7 @@ use the current global value of the template template parameter. tssp = template_sym->variant.template_info; is_alias_template = tssp->variant.class_template.is_alias_template; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ftc")) { fprintf(f_debug, "find_template_class: beginning search for arg list "); db_template_arg_list(*new_list); @@ -12107,6 +12178,7 @@ use the current global value of the template template parameter. db_symbol_name(template_sym); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* The template symbol must be for the primary template. */ check_assertion(tssp->primary_template_sym == NULL); @@ -12294,6 +12366,7 @@ use the current global value of the template template parameter. } /* if */ #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ftc")) { fprintf(f_debug, "find_template_class: for arg list "); db_template_arg_list(list_for_instantiation); @@ -12305,6 +12378,7 @@ use the current global value of the template template parameter. fprintf(f_debug, ", not found\n"); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!do_not_create && (sym == NULL || @@ -12895,10 +12969,12 @@ instead of creating a real instantiation. *new_templ_arg_list = copy_template_arg_list(*new_templ_arg_list); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("instantiations")) { db_symbol(sym, "created: ", 2); db_symbol(template_sym, "template: ", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { a_variable_ptr var; @@ -13215,12 +13291,14 @@ doing C++17-style template template parameter matching. new_list = NULL; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("cital")) { fprintf(f_debug, "create_initial_template_arg_list:\n"); db_template_param_list(templ_param_list); db_template_arg_list(new_list); fprintf(f_debug, "\n\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return new_list; } /* create_initial_template_arg_list */ @@ -14284,12 +14362,14 @@ argument deduction purposes. a_type_ptr templ_type_underlying = NULL; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("qc")) { fprintf(f_debug, "matches_template_type_with_qualification_conversion:\n"); fprintf(f_debug, " type: "); db_type(type); fprintf(f_debug, "\n templ_type: "); db_type(templ_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ type = skip_typerefs(type); templ_type = skip_typerefs(templ_type); @@ -14330,12 +14410,14 @@ argument deduction purposes. types match. */ match = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("qc")) { fprintf(f_debug, "Underlying types:\n"); fprintf(f_debug, " type: "); db_type(type); fprintf(f_debug, "\n templ_type: "); db_type(templ_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (microsoft_mode) { /* The Microsoft compiler drops the qualifiers on the underlying @@ -14348,12 +14430,14 @@ argument deduction purposes. templ_type_underlying = skip_typerefs(templ_type_underlying); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("qc")) { fprintf(f_debug, "Adjusted underlying types:\n"); fprintf(f_debug, " type: "); db_type(type_underlying); fprintf(f_debug, "\n templ_type: "); db_type(templ_type_underlying); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Note that because qualifiers on function types have no effect, the check for a qualification conversion as part of deduction is not done @@ -14463,6 +14547,7 @@ points to the template parameter list. a_symbol_ptr sym, templ_sym; an_mtt_flag_set new_flags; #if DEBUG +/* GCOVR_EXCL_START */ a_type_ptr orig_type = type; a_type_ptr orig_templ_type = templ_type; @@ -14475,6 +14560,7 @@ points to the template parameter list. db_type(templ_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* When this routine calls itself recursively, the recursive calls should not allow conversions or the special unknown this class @@ -15216,6 +15302,7 @@ points to the template parameter list. } /* if */ done: #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("mtt")) { fprintf(f_debug, "matches_template_type type: "); db_type(orig_type); @@ -15223,6 +15310,7 @@ points to the template parameter list. db_type(orig_templ_type); fprintf(f_debug, ", match=%s\n", match ? "TRUE" : "FALSE"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return match; @@ -17892,11 +17980,13 @@ a pointer over a reference type or creating an array of references. db_enter(5, "copy_type_with_substitution"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5 || db_flag_is_set("ctws")) { fputs("in: ", f_debug); db_type(type); fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ type = skip_lexical_typerefs(type); if (type->source_corresp.is_class_member && type_is(type, tk_typeref)) { @@ -18681,6 +18771,7 @@ a pointer over a reference type or creating an array of references. if (*copy_error) new_type = error_type(); if (new_type == adjusted_orig_type) new_type = orig_type; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5 || db_flag_is_set("ctws")) { fputs("out: ", f_debug); if (*copy_error) { @@ -18690,6 +18781,7 @@ a pointer over a reference type or creating an array of references. } /* if */ fputc('\n', f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return new_type; @@ -21892,9 +21984,11 @@ mode in-class specialization. declared_type = routine_type_without_default_args(declared_type); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 || db_flag_is_set("dump_ss_full")) { fputs("creating new template function:\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_source_sequence_entry_for_partial_instantiation( (char *)rp, @@ -21908,6 +22002,7 @@ mode in-class specialization. #endif /* NONCLASS_TEMPLATE_INSTANTIATIONS_IN_SOURCE_SEQUENCE_LISTS */ #endif /* GENERATE_SOURCE_SEQUENCE_LISTS */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", sym)) { fprintf(f_debug, "partial instantiation: "); db_symbol_name_trans_unit(sym); @@ -21915,6 +22010,7 @@ mode in-class specialization. db_symbol_name_trans_unit(templ_sym); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Pop the template instantiation scope. */ pop_template_instantiation_scope(); @@ -23345,10 +23441,12 @@ resulting data structure and the pointer provided by the caller is set to NULL. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { db_symbol(sym, "created: ", 2); db_symbol(templ_sym, "template: ", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { sym = tip->instance_sym; @@ -30312,7 +30410,9 @@ to it. etfp = alloc_fe_of_type(an_exported_template_file); #if DEBUG +/* GCOVR_EXCL_START */ num_exported_template_files_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ etfp->directory_name = NULL; etfp->source_file_name = NULL; @@ -34222,9 +34322,11 @@ END_DISABLE_GCC_WARNING_MAYBE_UNITIALIZED remove_stop_token(tok_rbrace); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { if (sym != NULL) db_symbol(sym, "template symbol: ", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ decl_state->sym = sym; #if BACK_END_IS_CP_GEN_BE @@ -35874,7 +35976,9 @@ a pointer to the entry. /* Allocate a new entry. */ dccp = alloc_fe_of_type(a_deferred_constraint_check); #if DEBUG +/* GCOVR_EXCL_START */ num_deferred_constraint_checks_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ dccp->next = NULL; @@ -35941,6 +36045,7 @@ Free any deferred constraint checks that may have been created. } /* f_discard_deferred_constraint_checks */ #if DEBUG +/* GCOVR_EXCL_START */ void db_generic_constraint_kind(a_generic_constraint_kind kind) /* @@ -35992,6 +36097,7 @@ number of characters to indent the output. } /* for */ } /* db_generic_constraint_list */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -36019,6 +36125,7 @@ scanned yet. a_boolean any_errors = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("cfcc") && !in_generated_code()) { fprintf(f_debug, "check_for_constraint_conflict:\n"); fprintf(f_debug, " param_type: "); @@ -36037,6 +36144,7 @@ scanned yet. } /* if */ fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Go through the current list of constraints to check for a conflict. */ for (gcp = curr_list; gcp != NULL; gcp = gcp->next) { @@ -37554,17 +37662,21 @@ file we simply return. a_directory_name_entry_ptr dir_entry; #if DEBUG +/* GCOVR_EXCL_START */ a_boolean print_debug_info = FALSE; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_enter(3, "do_implicit_include_if_needed"); /* Translate the sequence number into a file name and line number. */ #if DEBUG +/* GCOVR_EXCL_START */ print_debug_info = debug_level >= 3 || db_flag_is_set("implicit_include"); if (print_debug_info) { fprintf(f_debug, "Attempting implicit include to define:\n"); db_symbol(tip->instance_sym, "", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ decl_position = &tip->template_sym->decl_position; sfp = source_file_for_seq(decl_position->seq, &line_number, @@ -37582,10 +37694,12 @@ file we simply return. do so now. */ check_assertion(!after_instantiation_wrapup); #if DEBUG +/* GCOVR_EXCL_START */ if (print_debug_info) { fprintf(f_debug, " Looking for source file related to '%s'\n", sfp->file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ sfp->related_file_implicit_include_done = TRUE; is_system_include = sfp->included_by_system_include; @@ -37617,9 +37731,11 @@ file we simply return. !find_include_history(full_file_name, &ifhp, /*create=*/FALSE, /*use_canonical=*/TRUE)) { #if DEBUG +/* GCOVR_EXCL_START */ if (print_debug_info || db_flag_is_set("show_implicit_include")) { fprintf(f_debug, " Including text from '%s'\n", full_file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Push the new file onto the input stack and scan it. There is no "name as written" so a NULL pointer is passed in. */ @@ -37635,10 +37751,12 @@ file we simply return. too. */ if (!suppress_include) (void)fclose(f_source); #if DEBUG +/* GCOVR_EXCL_START */ if (print_debug_info) { fprintf(f_debug, "%s %s %s\n", "do_implicit_include_if_needed:", "skipping guarded include file", full_file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { /* Defer any instantiations caused by the processing of the @@ -38516,7 +38634,9 @@ data member specified by tip. a_boolean trans_unit_pushed = FALSE; a_boolean pushed_for_export = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ a_boolean output_debug_info; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* The instantiation process may rescan various things and invalidate the current token positions as a result. Save these positions so that they @@ -38528,12 +38648,14 @@ data member specified by tip. #endif /* EXTRA_SOURCE_POSITIONS_IN_IL */ #if DEBUG +/* GCOVR_EXCL_START */ output_debug_info = db_sym_trace("instantiations", tip->instance_sym); if (output_debug_info) { fprintf(f_debug, "instantiate_entity: "); db_symbol_name_trans_unit(tip->instance_sym); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ saved_pos_curr_token = pos_curr_token; saved_error_position = error_position; @@ -38581,11 +38703,13 @@ data member specified by tip. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (tip != NULL && output_debug_info) { fprintf(f_debug, "Corresponding instance is: "); db_symbol_name_trans_unit(tip->instance_sym); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ if (tip == NULL) { @@ -38683,7 +38807,9 @@ to it. tlp = alloc_fe_of_type(a_template_lookup_entry); #if DEBUG +/* GCOVR_EXCL_START */ num_template_lookup_entries_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ tlp->next = NULL; tlp->name = NULL; @@ -39056,12 +39182,14 @@ instantiation request file. mip->add_to_request_file = TRUE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", tip->instance_sym)) { fprintf(f_debug, "check_if_entity...: "); db_symbol_name_trans_unit(tip->instance_sym); fprintf(f_debug, ": instantiate=%d, add_to_request_file=%d\n", instantiate, add_to_request_file); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* check_if_entity_should_be_automatically_instantiated */ @@ -39123,10 +39251,12 @@ specified by tip. saved_instantiation_mode = instantiation_mode; instantiation_mode = tim_none; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fprintf(f_debug, "Automatic instantiation processing for:\n"); db_symbol(tip->instance_sym, "", 0); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Do the instantiation. */ instantiate_entity(tip); @@ -39163,9 +39293,11 @@ Returns a pointer to the FILE structure for the file. (a_text_buffer_ptr)NULL); full_name = file_name_buffer->buffer; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("export")) { fprintf(f_debug, "Opening export template file: %s\n", full_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ f_file = fopen_with_error(full_name, "r", OFF_NO_OPTIONS, ec_exported_template); @@ -39354,9 +39486,11 @@ Attempt to open the export information in the directory specified by eifp->file_name = copy_string_to_region(FRONT_END_REGION_NUMBER, file_name); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("export")) { fprintf(f_debug, "Opening export information file: %s\n", file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ f_file = fopen_with_error(file_name, "r", OFF_OKAY_IF_NOT_FOUND, ec_export_info); @@ -39752,11 +39886,13 @@ Assign a master instance entry for the template instance "tip". } /* if */ canonical_tip->master_instance = mip; #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", tip->instance_sym)) { fprintf(f_debug, "find_or_create_master_instance: symbol: \n"); db_symbol_name_trans_unit(tip->instance_sym); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ /* Save a pointer to the master instance in the template instance. */ @@ -39764,6 +39900,7 @@ Assign a master instance entry for the template instance "tip". } /* find_or_create_master_instance */ #if DEBUG +/* GCOVR_EXCL_START */ static void db_instance_count(a_master_instance_ptr mip, a_boolean increment) @@ -39780,6 +39917,7 @@ incremented. (int)mip->instance_required_count, (void *)mip); } /* db_instance_count */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -39939,6 +40077,7 @@ unless the SIR_CLEAR_VALUE flag is set in "options". } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", sym) || db_sym_trace("uirf", sym)) { fprintf(f_debug, @@ -39952,6 +40091,7 @@ unless the SIR_CLEAR_VALUE flag is set in "options". } /* if */ fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Master instances are created immediately in the primary translation unit, but in secondary translation units they are only established after @@ -40005,9 +40145,11 @@ unless the SIR_CLEAR_VALUE flag is set in "options". mip->instance_required_count--; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", sym)) { db_instance_count(mip, /*increment=*/FALSE); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_assertion(mip->instance_required_count >= 0); /* If the instance count has been decremented to zero, reset the @@ -40046,9 +40188,11 @@ unless the SIR_CLEAR_VALUE flag is set in "options". translation units that require the instantiation. */ mip->instance_required_count++; #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", sym)) { db_instance_count(mip, /*increment=*/TRUE); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ if (!flag_already_set) { @@ -40163,11 +40307,13 @@ Does nothing if called in C mode. a_template_instance_ptr tip; #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", sym)) { fprintf(f_debug, "Setting instance required for "); db_symbol_name_trans_unit(sym); fprintf(f_debug, " to %s\n", value ? "true" : "false"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (symbol_is(sym, sk_static_data_member)) { /*lint -e{506}*/ @@ -40411,6 +40557,7 @@ for adding the entries to the actual instantiation request file. fputs("\n", f_definition_list); } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", mip->instance->instance_sym)) { fprintf(f_debug, "add_entities_to_request_file: "); db_symbol_name(mip->instance->instance_sym); @@ -40422,6 +40569,7 @@ for adding the entries to the actual instantiation request file. fprintf(f_debug, " needed=%d\n", needed); #endif /* MAINTAIN_NEEDED_FLAGS */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ close_output_file_with_error_handling(&f_definition_list, @@ -40692,6 +40840,7 @@ be processed. routine->instance_required = instance_required; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", instance_sym)) { fprintf(f_debug, "update_auto_instantiation_flags:\n"); if (is_variable) { @@ -40714,6 +40863,7 @@ be processed. db_symbol_name(mip->instance->instance_sym); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (instantiation_flags_needed() && (instance_required || can_be_instantiated || do_not_instantiate)) { @@ -40865,11 +41015,13 @@ that might be required. for this entity. */ (void)is_static_or_inline_template_entity(tip); #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("instantiations", tip->instance_sym)) { fprintf(f_debug, "do_any_needed_instantiations, checking: "); db_symbol_name_trans_unit(tip->instance_sym); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Skip entries that have already been instantiated. */ if (mip->already_instantiated) continue; @@ -40984,9 +41136,11 @@ correspondence information established first. if (tip->instantiation_required) { tip->master_instance->instance_required_count++; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("instantiations")) { db_instance_count(tip->master_instance, /*increment=*/TRUE); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* for */ @@ -41331,6 +41485,7 @@ emitted in this translation unit. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("instantiation", rout_ptr, iek_routine)) { fprintf(f_debug, "inline_function_should_be_emitted:\n"); db_entity_info((char*)rout_ptr, iek_routine); @@ -41343,6 +41498,7 @@ emitted in this translation unit. is_nontemplate_routine_from_exported_trans_unit(rout_ptr)); #endif /* AUTOMATIC_TEMPLATE_INSTANTIATION */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return result; } /* inline_function_should_be_emitted */ @@ -41487,6 +41643,7 @@ emitted in this translation unit. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("instantiation", var, iek_variable)) { fprintf(f_debug, "inline_variable_should_be_emitted:\n"); db_entity_info((char*)var, iek_variable); @@ -41497,6 +41654,7 @@ emitted in this translation unit. inline_variable_in_request_file(var)); #endif /* AUTOMATIC_TEMPLATE_INSTANTIATION */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ return result; } /* inline_variable_should_be_emitted */ @@ -41804,6 +41962,7 @@ a definition (if needed) for extern inline entities. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("instantiation", rout_ptr, iek_routine)) { fprintf(f_debug, "create_inst_flags_for_inline_function:\n"); db_entity_info((char*)rout_ptr, iek_routine); @@ -41821,6 +41980,7 @@ a definition (if needed) for extern inline entities. fprintf(f_debug, " suppress_inline_body=%d\n", (a_boolean)rout_ptr->suppress_inline_body); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* create_instantiation_flags_for_inline_function */ @@ -41878,6 +42038,7 @@ a definition (if needed) for extern inline entities. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("instantiation", var, iek_variable)) { fprintf(f_debug, "create_inst_flags_for_inline_variable:\n"); db_entity_info((char*)var, iek_variable); @@ -41887,6 +42048,7 @@ a definition (if needed) for extern inline entities. fprintf(f_debug, " inline_instance_required=%d\n", (a_boolean)var->inline_instance_required); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* create_instantiation_flags_for_inline_variable */ @@ -42352,6 +42514,7 @@ this routine is called indirectly for a class instantiation. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 3) { fprintf(f_debug, "Updated instantiation flags for:\n"); if (sym != NULL) { @@ -42361,6 +42524,7 @@ this routine is called indirectly for a class instantiation. } /* if */ fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); } /* update_instantiation_flags */ @@ -45012,12 +45176,14 @@ identical). tssp->il_template_entry->template_decl = guide_template_decl; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("impl_guide")) { db_type(ctor_rout->type); fprintf(f_debug, "\n"); db_type(rout_type); fprintf(f_debug, "\n\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ tssp->variant.function.routine = rout; if (orig_ct_sym->is_class_member) { @@ -45586,6 +45752,7 @@ On success, return the symbol for the new guide; otherwise return NULL. } /* if */ rout_type = guide->type; #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ctad")) { fputs("ctad for alias-like template: ", f_debug); db_type(def_type); @@ -45593,6 +45760,7 @@ On success, return the symbol for the new guide; otherwise return NULL. db_type(guide->type); fputs("\n", f_debug); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* A rescan context is needed because nonreal types will be created below. */ push_instantiation_scope_for_rescan(NULL); @@ -46019,9 +46187,11 @@ On success, return the symbol for the new guide; otherwise return NULL. rout->compiler_generated = guide->compiler_generated; add_to_routines_list(rout, NO_SCOPE_DEPTH); #if DEBUG +/* GCOVR_EXCL_START */ if (db_flag_is_set("ctad")) { db_symbol(new_guide, "transformed guide: ", 2); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_deduction_guide(new_guide, p_guide_set); } @@ -46543,6 +46713,7 @@ deduction succeeds and results in the same type "A". #if DEBUG +/* GCOVR_EXCL_START */ unsigned long db_show_template_space_used(unsigned long grand_total) /* Show space used by the template routines. This is called by @@ -46579,6 +46750,7 @@ routines is reported as part of the symbol table memory used. #endif /* TEMPLATE_LOOKUP_NEEDED */ return grand_total; } /* db_show_template_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -46610,6 +46782,7 @@ One-time initialization for templates.c static variables. pch_saved_var_array_elem(local_type_used_as_template_type_argument), #endif /* ENSURE_LOWERED_TYPE_LIST_ORDERING */ #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_partial_order_candidates_allocated), pch_saved_var_array_elem(num_tmpl_decl_states_allocated), pch_saved_var_array_elem(num_variadic_param_infos_allocated), @@ -46617,6 +46790,7 @@ One-time initialization for templates.c static variables. pch_saved_var_array_elem(num_template_lookup_entries_allocated), pch_saved_var_array_elem(num_exported_template_files_allocated), #endif /* TEMPLATE_LOOKUP_NEEDED */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pch_saved_var_array_elem(initializer_list_sym_hdr), pch_saved_var_array_elem(invented_template_sym_hdr), @@ -46699,6 +46873,7 @@ Initializations for template. local_type_used_as_template_type_argument = FALSE; #endif /* ENSURE_LOWERED_TYPE_LIST_ORDERING */ #if DEBUG +/* GCOVR_EXCL_START */ num_partial_order_candidates_allocated = 0; num_tmpl_decl_states_allocated = 0; num_variadic_param_infos_allocated = 0; @@ -46709,6 +46884,7 @@ Initializations for template. num_template_lookup_entries_allocated = 0; num_exported_template_files_allocated = 0; #endif /* TEMPLATE_LOOKUP_NEEDED */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if AUTOMATIC_TEMPLATE_INSTANTIATION any_instantiated_entities_added_to_request_file = FALSE; diff --git a/src/templates.h b/src/templates.h index 3a8375e2a3..5bf13da3d5 100644 --- a/src/templates.h +++ b/src/templates.h @@ -1559,6 +1559,7 @@ Throw away any deferred constraint entries. } #if DEBUG +/* GCOVR_EXCL_START */ extern void db_generic_constraint_kind(a_generic_constraint_kind kind); @@ -1568,6 +1569,7 @@ void db_generic_constraint(a_generic_constraint_ptr gcp); extern void db_generic_constraint_list(a_generic_constraint_ptr gcp, int indent); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #else /* !MICROSOFT_EXTENSIONS_ALLOWED */ @@ -1635,7 +1637,9 @@ extern a_boolean is_template_deducible_from(a_template_ptr tmpl, a_type_ptr type); #if DEBUG +/* GCOVR_EXCL_START */ extern unsigned long db_show_template_space_used(unsigned long grand_total); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ extern a_hash_value hash_instantiation(a_void_ptr key); diff --git a/src/trans_copy.c b/src/trans_copy.c index 96a76d7930..62e02ffcd8 100644 --- a/src/trans_copy.c +++ b/src/trans_copy.c @@ -229,11 +229,13 @@ needed. /* Set the flag to request copying. */ set_entry_needs_copy_flag(ptr); #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_copy", ptr, kind)) { fprintf(f_debug, "assigned addr for copy to primary at %p:\n", (a_void_ptr)copy); db_entity_info(ptr, kind); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (!known_will_process_in_curr_walk) { /* We don't know for sure that the entry will be processed in the @@ -486,10 +488,12 @@ and remap the pointers in the copy. tucp->canonical = copy; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_copy", ptr, kind)) { fprintf(f_debug, "copying from secondary to %p:\n", (a_void_ptr)copy); db_entity_info(ptr, kind); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ #if MAINTAIN_NEEDED_FLAGS @@ -944,7 +948,9 @@ source correspondence field is scp and whose kind is "kind" are consistent. (scp->name_linkage == (a_name_linkage_kind)nlk_external || scp->name_linkage == (a_name_linkage_kind)nlk_cplusplus_external)) { #if DEBUG +/* GCOVR_EXCL_START */ db_entity_info((char *)scp, kind); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str( "entity with external linkage does not have corresp info"); @@ -956,8 +962,10 @@ source correspondence field is scp and whose kind is "kind" are consistent. /* The primary IL entry is the canonical one, but the current entry is better. That means the correspondence information is wrong. */ #if DEBUG +/* GCOVR_EXCL_START */ db_entity_info(tucp->primary, kind); db_entity_info((char *)scp, kind); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str("primary entry should not be canonical"); } /* if */ @@ -1031,11 +1039,13 @@ before this routine is called. /* Set the flag to request copying. */ set_entry_needs_copy_flag(ptr); #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_copy", ptr, kind)) { fprintf(f_debug, "assigned addr for copy in secondary at %p:\n", (a_void_ptr)copy); db_entity_info(ptr, kind); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ } /* f_mark_to_merge */ @@ -1606,7 +1616,9 @@ to the secondary translation unit. prev_type = NULL; for (type = scope->types; type != NULL; type = type->next) { #if DEBUG +/* GCOVR_EXCL_START */ a_type_ptr trace_type = type; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ check_correspondences(&type->source_corresp, iek_type); keep_on_list = TRUE; @@ -1642,6 +1654,7 @@ to the secondary translation unit. keep_on_list = FALSE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_copy", trace_type, iek_type)) { fprintf(f_debug, "prepare_for_trans_unit_copy, "); fprintf(f_debug, "%skeeping on list, ", keep_on_list ? "" : "not "); @@ -1649,6 +1662,7 @@ to the secondary translation unit. entry_to_be_merged(type) ? "" : "not "); db_entity_info((char *)type, iek_type); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (keep_on_list) { prev_type = type; @@ -1721,6 +1735,7 @@ to the secondary translation unit. keep_on_list = FALSE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_copy", variable, iek_variable)) { fprintf(f_debug, "prepare_for_trans_unit_copy, "); fprintf(f_debug, "%skeeping on list, ", keep_on_list ? "" : "not "); @@ -1728,6 +1743,7 @@ to the secondary translation unit. entry_to_be_merged(variable) ? "" : "not "); db_entity_info((char *)variable, iek_variable); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (keep_on_list) { prev_variable = variable; @@ -1818,6 +1834,7 @@ to the secondary translation unit. keep_on_list = FALSE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_copy", routine, iek_routine)) { fprintf(f_debug, "prepare_for_trans_unit_copy, "); fprintf(f_debug, "%skeeping on list, ", keep_on_list ? "" : "not "); @@ -1825,6 +1842,7 @@ to the secondary translation unit. entry_to_be_merged(routine) ? "" : "not "); db_entity_info((char *)routine, iek_routine); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (keep_on_list) { prev_routine = routine; @@ -2365,12 +2383,14 @@ with the current translation unit set to the primary translation unit. a_type_ptr primary_type = (a_type_ptr)checked_trans_unit_copy_address_of(corresp_type); #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_copy", corresp_type, iek_type)) { fprintf(f_debug, "finish_trans_unit_copy, merging into %p after copy:\n", (void *)primary_type); db_entity_info((char *)corresp_type, iek_type); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_to_list = FALSE; if (!entry_should_overwrite_primary_entry(type)) { @@ -2411,11 +2431,13 @@ with the current translation unit set to the primary translation unit. if (add_to_list) { /* Add the type to the end of the list. */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_copy", corresp_type, iek_type)) { fprintf(f_debug, "finish_trans_unit_copy, adding to list after copy:\n"); db_entity_info((char *)corresp_type, iek_type); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (is_class_scope && last_type == NULL) { /* Determine the last type the first time it is needed. */ @@ -2482,12 +2504,14 @@ with the current translation unit set to the primary translation unit. (a_variable_ptr)checked_trans_unit_copy_address_of( corresp_variable); #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_copy", corresp_variable, iek_variable)) { fprintf(f_debug, "finish_trans_unit_copy, merging into %p after copy:\n", (void *)primary_variable); db_entity_info((char *)corresp_variable, iek_variable); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_to_list = FALSE; if (!entry_should_overwrite_primary_entry(variable)) { @@ -2540,11 +2564,13 @@ with the current translation unit set to the primary translation unit. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_copy", corresp_variable, iek_variable)) { fprintf(f_debug, "finish_trans_unit_copy, adding to list after copy:\n"); db_entity_info((char *)corresp_variable, iek_variable); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Add the variable to the end of the list. */ if (last_variable == NULL) { @@ -2605,12 +2631,14 @@ with the current translation unit set to the primary translation unit. (a_routine_ptr)checked_trans_unit_copy_address_of( corresp_routine); #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_copy", corresp_routine, iek_routine)) { fprintf(f_debug, "finish_trans_unit_copy, merging into %p after copy:\n", (void *)primary_routine); db_entity_info((char *)corresp_routine, iek_routine); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ add_to_list = FALSE; if (!entry_should_overwrite_primary_entry(routine)) { @@ -2661,11 +2689,13 @@ with the current translation unit set to the primary translation unit. } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_copy", corresp_routine, iek_routine)) { fprintf(f_debug, "finish_trans_unit_copy, adding to list after copy:\n"); db_entity_info((char *)corresp_routine, iek_routine); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Add the routine to the end of the list. */ if (last_routine == NULL) { @@ -2940,20 +2970,24 @@ inline functions, if appropriate. if (primary_routine->on_inline_function_list) { /* There is already a list entry for the routine in the primary IL. */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_copy", primary_routine, iek_routine)) { fprintf(f_debug, "ensure_routine_is_on_inline_list: already on list:\n"); db_entity_info((char *)primary_routine, iek_routine); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } else { /* Add an entry for the routine. */ add_to_inline_function_list(primary_routine); #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_copy", primary_routine, iek_routine)) { fprintf(f_debug, "ensure_routine_is_on_inline_list: adding:\n"); db_entity_info((char *)primary_routine, iek_routine); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if MAINTAIN_NEEDED_FLAGS /* If the suppress_inline_body flag indicates that this function @@ -3242,20 +3276,24 @@ therefore will not be copied. a_boolean any_removed_function_bodies = FALSE; switch_translation_unit(tup); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 1) { fprintf(f_debug, "Preparing copy from sec trans unit %s:\n", curr_translation_unit->source_file->name_as_written); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ top_scope = il_header.primary_scope; check_assertion(!il_entry_prefix_of(top_scope).il_lowering_flag); (void)prepare_for_trans_unit_copy(top_scope, &any_removed_function_bodies); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 1) { fprintf(f_debug, "Done preparing copy from sec trans unit %s\n", curr_translation_unit->source_file->name_as_written); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ in_trans_copy_setup = FALSE; @@ -3263,10 +3301,12 @@ therefore will not be copied. for (tup = translation_units->next; tup != NULL; tup = tup->next) { switch_translation_unit(tup); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 1) { fprintf(f_debug, "Copying from sec trans unit %s:\n", curr_translation_unit->source_file->name_as_written); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ top_scope = il_header.primary_scope; copy_from_secondary_to_primary_IL(); @@ -3275,11 +3315,13 @@ therefore will not be copied. /* Also remap pointers in bodies of functions. */ copy_function_bodies_from_secondary_to_primary_IL(top_scope); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 1) { fprintf(f_debug, "Done copying from sec trans unit %s\n", curr_translation_unit->source_file->name_as_written); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ switch_translation_unit(translation_units); @@ -3288,10 +3330,12 @@ therefore will not be copied. primary translation unit. */ for (tup = translation_units->next; tup != NULL; tup = tup->next) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 1) { fprintf(f_debug, "Wrapping up copy from sec trans unit %s:\n", curr_translation_unit->source_file->name_as_written); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ top_scope = tup->primary_scope; finish_trans_unit_copy(top_scope); @@ -3300,10 +3344,12 @@ therefore will not be copied. finish_scope_orphaned_list_processing( tup->il_header.scope_orphaned_list_headers); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 1) { fprintf(f_debug, "Done wrapping up copy from sec trans unit %s:\n", curr_translation_unit->source_file->name_as_written); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* for */ if (!C_mode()) { diff --git a/src/trans_corresp.c b/src/trans_corresp.c index 4246daba3d..b1f1a537c8 100644 --- a/src/trans_corresp.c +++ b/src/trans_corresp.c @@ -308,6 +308,7 @@ sym. #if DEBUG +/* GCOVR_EXCL_START */ /* The following variable can be set to point to an IL entry from within a debugger. When that IL entry's correspondence is modified, corresp_intercept @@ -348,6 +349,7 @@ canonical entry (or NULL if none). return result; } /* db_corresp */ +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ #define trace_corresp_check(ptr) /* Nothing */ @@ -355,6 +357,7 @@ canonical entry (or NULL if none). #endif /* DEBUG */ #if DEBUG +/* GCOVR_EXCL_START */ void db_sym_list(a_symbol_list_entry_ptr entries) /* @@ -387,6 +390,7 @@ Dump a short summary of the symbols in the given list. } /* while */ } /* db_sym_list */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -399,6 +403,7 @@ given entity. { check_assertion(entity != NULL); #if DEBUG +/* GCOVR_EXCL_START */ if (tcp->kind != (an_il_entry_kind)iek_base_class && (db_trace("trans_corresp", entity, tcp->kind) || (tcp->canonical != NULL && @@ -414,6 +419,7 @@ given entity. fprintf(f_debug, " is canonical.\n"); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ tcp->canonical = entity; } /* f_change_canonical_entry */ @@ -611,10 +617,12 @@ exact criteria). instantiations should be reattached to the new canonical entry. */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_corresp", templ, iek_template) || db_trace("trans_corresp", corresp_templ, iek_template)) { fprintf(f_debug, "all_instantiations transferred because\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (corresp_tssp->all_instantiations == NULL) { corresp_tssp->all_instantiations = tssp->all_instantiations; @@ -752,6 +760,7 @@ this routine will create such a correspondence entry. "f_set_trans_unit_corresp: bad input"); trace_corresp_check(entity1); #if DEBUG +/* GCOVR_EXCL_START */ if (kind != (an_il_entry_kind)iek_base_class && db_trace("trans_corresp", entity1, kind)) { db_scp(entity1); @@ -759,6 +768,7 @@ this routine will create such a correspondence entry. db_scp(entity2); fprintf(f_debug, ".\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (kind == (an_il_entry_kind)iek_base_class) { /* Base class entries are the only entries with a correspondence pointer @@ -883,11 +893,13 @@ has not yet been examined for a matching entry in another translation unit. trace_corresp_check(entity); #if DEBUG +/* GCOVR_EXCL_START */ if (kind != (an_il_entry_kind)iek_base_class && db_trace("trans_corresp", entity, kind)) { db_scp(entity); fprintf(f_debug, " has no correspondence.\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ tcp = detach_trans_unit_corresp(kind, entity); if (*tcp == NULL) { @@ -1947,6 +1959,7 @@ its corresponding primary template supplement will be used instead. tssp->all_instantiations = slep; slep->symbol = inst; #if DEBUG +/* GCOVR_EXCL_START */ if (db_sym_trace("trans_corresp", inst)) { a_line_number line; a_const_char *file_name, *full_name; @@ -1971,6 +1984,7 @@ its corresponding primary template supplement will be used instead. fprintf(f_debug, "unknown symbol\n"); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* add_instantiation */ @@ -2358,8 +2372,10 @@ symbols are listed under the same header). (sym1->kind == (a_symbol_kind)sk_routine && rout_befriending_classes(sym1->variant.routine.ptr) != NULL))) { #if DEBUG +/* GCOVR_EXCL_START */ db_sym(sym1); db_sym(sym2); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ unexpected_condition_str("Expected a class member"); } /* if */ @@ -5536,9 +5552,11 @@ translation unit correspondence pointer if one is found. if (trans_unit_corresp_of(nsp) == NULL) { /* Mark this namespace as visited to avoid infinite recursion. */ #if DEBUG +/* GCOVR_EXCL_START */ if (db_trace("trans_corresp", nsp, iek_namespace)) { fprintf(f_debug, "Guard: "); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ set_no_trans_unit_corresp(iek_namespace, nsp); } /* if */ diff --git a/src/trans_corresp.h b/src/trans_corresp.h index ce5ec34e08..83de8cf727 100644 --- a/src/trans_corresp.h +++ b/src/trans_corresp.h @@ -312,9 +312,11 @@ extern a_type_ptr canonical_type_entry_of(a_type_ptr type); extern a_template_ptr canonical_template_entry_of(a_template_ptr templ); #if DEBUG +/* GCOVR_EXCL_START */ extern void* db_corresp(void *ptr); extern void db_sym_list(a_symbol_list_entry_ptr entries); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Conditionally close the "edg" namespace. */ diff --git a/src/trans_unit.c b/src/trans_unit.c index 00c8b89c7f..20fe93eae2 100644 --- a/src/trans_unit.c +++ b/src/trans_unit.c @@ -118,12 +118,14 @@ STATIC_THREAD a_boolean #endif /* CHECKING */ #if DEBUG +/* GCOVR_EXCL_START */ STATIC_THREAD unsigned long num_translation_unit_stack_entries_allocated, num_export_trans_unit_stack_entries_allocated, num_translation_units_allocated, num_trans_unit_corresps_allocated, num_variable_registrations_allocated; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -142,7 +144,9 @@ and return a pointer to it. } else { tucp = alloc_fe_of_type(a_trans_unit_corresp); #if DEBUG +/* GCOVR_EXCL_START */ num_trans_unit_corresps_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ tucp->canonical = NULL; @@ -188,7 +192,9 @@ a pointer to the entry created. /* Allocate a new entry. */ tusep = alloc_general_of_type(a_translation_unit_stack_entry); #if DEBUG +/* GCOVR_EXCL_START */ num_translation_unit_stack_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ tusep->next = NULL; @@ -214,7 +220,9 @@ fields, and return a pointer to the entry created. /* Allocate a new entry. */ tusep = alloc_general_of_type(an_export_trans_unit_stack_entry); #if DEBUG +/* GCOVR_EXCL_START */ num_export_trans_unit_stack_entries_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ } /* if */ tusep->next = NULL; @@ -233,7 +241,9 @@ a pointer to the entry created. vrp = alloc_general_of_type(a_variable_registration); #if DEBUG +/* GCOVR_EXCL_START */ num_variable_registrations_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ vrp->next = NULL; vrp->ptr = NULL; @@ -501,6 +511,7 @@ the proper global variable addresses. } /* fix_up_translation_unit */ #if DEBUG +/* GCOVR_EXCL_START */ void db_translation_unit(a_translation_unit_ptr tup) /* @@ -532,6 +543,7 @@ Display the translation unit stack, for debugging purposes. } while (tup != NULL); } /* db_translation_unit_stack */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ void switch_translation_unit(a_translation_unit_ptr tup) @@ -696,7 +708,9 @@ a pointer to the entry created. #endif /* CHECKING */ tup = alloc_fe_of_type(a_translation_unit); #if DEBUG +/* GCOVR_EXCL_START */ num_translation_units_allocated++; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ tup->next = NULL; /* Allocate the variable block for this translation unit. */ @@ -771,9 +785,11 @@ treated as separate translation units of a single compilation. a_translation_unit_ptr trans_unit; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 1 || db_flag_is_set("trans_unit")) { fprintf(f_debug, "Processing translation unit %s\n", file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if CHECKING if (!is_primary && exported_file == NULL) { @@ -864,9 +880,11 @@ treated as separate translation units of a single compilation. /* Remove this entry from the translation unit stack. */ pop_translation_unit_stack(); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 1 || db_flag_is_set("trans_unit")) { fprintf(f_debug, "Done processing translation unit %s\n", file_name); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if COMPILE_MULTIPLE_TRANSLATION_UNITS if (is_primary) { @@ -880,6 +898,7 @@ treated as separate translation units of a single compilation. } /* process_translation_unit */ #if DEBUG +/* GCOVR_EXCL_START */ unsigned long db_show_trans_unit_space_used(unsigned long grand_total) /* @@ -910,6 +929,7 @@ routines is reported as part of the symbol table memory used. return grand_total; } /* db_show_trans_unit_space_used */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ @@ -925,7 +945,9 @@ One-time initialization for trans_unit variables. pch_saved_var_array_elem(translation_units), pch_saved_var_array_elem(translation_units_tail), #if DEBUG +/* GCOVR_EXCL_START */ pch_saved_var_array_elem(num_trans_unit_corresps_allocated), +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ pch_saved_var_array_terminating_elem() }; @@ -970,11 +992,13 @@ of the front end are called. avail_export_template_translation_unit_stack_entries = NULL; avail_trans_unit_corresps = NULL; #if DEBUG +/* GCOVR_EXCL_START */ num_translation_unit_stack_entries_allocated = 0; num_export_trans_unit_stack_entries_allocated = 0; num_translation_units_allocated = 0; num_variable_registrations_allocated = 0; num_trans_unit_corresps_allocated = 0; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if CHECKING any_translation_units_allocated = FALSE; diff --git a/src/trans_unit.h b/src/trans_unit.h index 25fc1ba557..b61d715bb2 100644 --- a/src/trans_unit.h +++ b/src/trans_unit.h @@ -341,11 +341,13 @@ Array version of register_trans_unit_variable_with_field. #if DEBUG +/* GCOVR_EXCL_START */ extern unsigned long db_show_trans_unit_space_used(unsigned long grand_total); extern void db_translation_unit(a_translation_unit_ptr tup); extern void db_translation_unit_stack(void); +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Conditionally close the "edg" namespace. */ diff --git a/src/types.c b/src/types.c index 3e8a3aed1b..60251fdf47 100644 --- a/src/types.c +++ b/src/types.c @@ -5274,6 +5274,7 @@ step on the derivation list serves to confirm the match. goto found_in_cache; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4) { fputs("looking in \"", f_debug); db_type_name(new_class); @@ -5284,6 +5285,7 @@ step on the derivation list serves to confirm the match. db_base_class(disambiguator, FALSE); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* Look for a match in the cache. */ key = { base_class, new_class, disambiguator }; @@ -5391,6 +5393,7 @@ step on the derivation list serves to confirm the match. new_base_class = NULL; #if CHECKING #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level > 0) { fputs("cannot find base class", f_debug); db_base_class(base_class, /*show_offset=*/FALSE); @@ -5406,6 +5409,7 @@ step on the derivation list serves to confirm the match. db_base_class(disambiguator, /*show_offset=*/FALSE); } /* if */ } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ internal_error("corresponding_base_class: base class not found"); #endif /* CHECKING */ @@ -5415,11 +5419,13 @@ step on the derivation list serves to confirm the match. } /* if */ found_in_cache: #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 4 && !same_entities(base_class->derived_class, new_class)) { fputs("found base class: ", f_debug); db_base_class(new_base_class, /*show_offset=*/FALSE); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return new_base_class; @@ -9834,10 +9840,12 @@ is the source type and type_2 the destination type. } /* if */ done: #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "f_types_are_compatible_full: %s\n", compat ? "TRUE":"FALSE"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return compat; @@ -11438,6 +11446,7 @@ operators), 3.3.15 (?: operator), and 3.3.16.1 (simple assignment). db_enter(5, "impl_pointer_conversion"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "impl_pointer_conversion: source_type = "); db_abbreviated_type(source_type); @@ -11445,6 +11454,7 @@ operators), 3.3.15 (?: operator), and 3.3.16.1 (simple assignment). db_abbreviated_type(dest_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ clear_std_conv_descr(std_conv); /* Assume a nontrivial conversion; the flag will be cleared later if in @@ -11904,10 +11914,12 @@ operators), 3.3.15 (?: operator), and 3.3.16.1 (simple assignment). } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "impl_pointer_conversion: %s\n", okay ? "okay" : "not okay"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return okay; @@ -12078,6 +12090,7 @@ that information is not needed. Doesn't cover boxing conversions db_enter(5, "impl_handle_conversion"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "impl_handle_conversion: source_type = "); db_abbreviated_type(source_type); @@ -12085,6 +12098,7 @@ that information is not needed. Doesn't cover boxing conversions db_abbreviated_type(dest_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (std_conv != NULL) { clear_std_conv_descr(std_conv); @@ -12187,10 +12201,12 @@ that information is not needed. Doesn't cover boxing conversions } /* if */ } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "impl_handle_conversion: %s\n", okay ? "okay" : "not okay"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return okay; @@ -12213,6 +12229,7 @@ conversion. std_conv can be NULL if that information is not needed. db_enter(5, "boxing_conversion_possible"); if (cli_or_cx_enabled) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "boxing_conversion_possible: source_type = "); db_abbreviated_type(source_type); @@ -12220,6 +12237,7 @@ conversion. std_conv can be NULL if that information is not needed. db_abbreviated_type(dest_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (std_conv != NULL) clear_std_conv_descr(std_conv); /* The source type has to be a value type, but not a pointer type. @@ -12283,6 +12301,7 @@ can be NULL if that information is not needed. db_enter(5, "unboxing_conversion_possible"); if (cli_or_cx_enabled) { #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "unboxing_conversion_possible: source_type = "); db_abbreviated_type(source_type); @@ -12290,6 +12309,7 @@ can be NULL if that information is not needed. db_abbreviated_type(dest_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ if (std_conv != NULL) clear_std_conv_descr(std_conv); /* The source type has to be a handle type. The destination type has @@ -12776,6 +12796,7 @@ pointers to members). db_enter(5, "impl_ptr_to_member_conversion"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "impl_ptr_to_member_conversion: source_type = "); db_abbreviated_type(source_type); @@ -12783,6 +12804,7 @@ pointers to members). db_abbreviated_type(dest_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ clear_std_conv_descr(std_conv); /* Assume a nontrivial conversion; the flag will be cleared later if in @@ -12895,10 +12917,12 @@ pointers to members). } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "impl_ptr_to_member_conversion: %s\n", okay ? "okay" : "not okay"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return okay; @@ -13034,6 +13058,7 @@ See conversion_possible. db_enter(5, "impl_conversion_possible"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "impl_conversion_possible: source_type = "); db_abbreviated_type(source_type); @@ -13041,6 +13066,7 @@ See conversion_possible. db_abbreviated_type(dest_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ clear_std_conv_descr(std_conv); /* Assume a nontrivial conversion; the flag will be cleared later if in @@ -13424,10 +13450,12 @@ See conversion_possible. std_conv->is_mild_warning = TRUE; } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "impl_conversion_possible: %s\n", okay ? "okay" : "not okay"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return okay; @@ -13806,6 +13834,7 @@ C++ mode. See [expr.static.cast]. saved_warning_on_lossy_conversion = warning_on_lossy_conversion; warning_on_lossy_conversion = FALSE; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "static_cast_conversion_possible_full: source_type = "); db_abbreviated_type(source_type); @@ -13813,6 +13842,7 @@ C++ mode. See [expr.static.cast]. db_abbreviated_type(dest_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ *warning_suggested = ec_no_error; *is_mild_warning = FALSE; @@ -13918,10 +13948,12 @@ C++ mode. See [expr.static.cast]. } /* if */ warning_on_lossy_conversion = saved_warning_on_lossy_conversion; #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "static_cast_conversion_possible_full: %s\n", okay ? "okay" : "not okay"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return okay; @@ -14005,6 +14037,7 @@ well as C++ mode. db_enter(5, "reinterpret_cast_conversion_possible_full"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "reinterpret_cast_conversion_possible_full: source_type = "); @@ -14013,6 +14046,7 @@ well as C++ mode. db_abbreviated_type(dest_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ *warning_suggested = ec_no_error; *is_mild_warning = FALSE; @@ -14236,10 +14270,12 @@ well as C++ mode. } /* if */ #endif /* MICROSOFT_EXTENSIONS_ALLOWED */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "reinterpret_cast_conversion_possible_full: %s\n", okay ? "okay" : "not okay"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return okay; @@ -14309,6 +14345,7 @@ set to TRUE (otherwise it is set to FALSE). db_enter(5, "expl_conversion_possible"); #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "expl_conversion_possible: source_type = "); db_abbreviated_type(source_type); @@ -14316,6 +14353,7 @@ set to TRUE (otherwise it is set to FALSE). db_abbreviated_type(dest_type); fprintf(f_debug, "\n"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ *reinterpret_cast_needed = FALSE; *warning_suggested = ec_no_error; @@ -14388,10 +14426,12 @@ set to TRUE (otherwise it is set to FALSE). } /* if */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "expl_conversion_possible: %s\n", okay ? "okay" : "not okay"); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ db_exit(); return okay; diff --git a/src/util.h b/src/util.h index 541a416e7f..8486d8abea 100644 --- a/src/util.h +++ b/src/util.h @@ -3752,6 +3752,7 @@ iterator first. Otherwise, return the iterator first + (last - middle). } /* rotate */ #if DEBUG +/* GCOVR_EXCL_START */ template void db_f_print_t(FILE *stream, ARG_UNUSED const T &value) @@ -3762,6 +3763,7 @@ Provide a generic printing interface for generic function diagnostics. fprintf(stream, "unspecified"); } /* db_f_print_t */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ #if EXPENSIVE_CHECKING && !STANDALONE_UTILITY_PROGRAM @@ -3782,7 +3784,9 @@ minimize the number of operators that need to be implemented. if (!(last_value < curr_value || last_value == curr_value)) { fprintf(stderr, "Binary search element %td (", i); #if DEBUG +/* GCOVR_EXCL_START */ db_f_print_t(stderr, curr_value); +/* GCOVR_EXCL_STOP */ #else /* !DEBUG */ fprintf(stderr, "unspecified"); #endif /* DEBUG */ @@ -5462,7 +5466,9 @@ struct Ptr_map: private Allocator> { INLINE auto number_of_elements() const -> size_t { return this->n_elements; } #if DEBUG +/* GCOVR_EXCL_START */ void db_ptrs() const; +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ INLINE an_iterator begin() const /*lint -e{1535}*/ @@ -5936,6 +5942,7 @@ done:; } /* Ptr_map::check_deleted_slot */ #if DEBUG +/* GCOVR_EXCL_START */ template class Allocator> @@ -5961,6 +5968,7 @@ Output some information about the map's key contents to f_debug. } /* for */ } /* Ptr_map::db_ptrs */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* diff --git a/src/walk_entry.h b/src/walk_entry.h index 08026d1b81..dcccb3abc9 100644 --- a/src/walk_entry.h +++ b/src/walk_entry.h @@ -736,10 +736,12 @@ debug builds) don't recognize that these variables are mutually-exclusive. } /* if */ #endif /* DO_SUBTREE_WALK */ #if DEBUG +/* GCOVR_EXCL_START */ if (debug_level >= 5) { fprintf(f_debug, "Walking IL tree, entry kind = %s\n", il_entry_kind_names[(int)entry_kind]); } /* if */ +/* GCOVR_EXCL_STOP */ #endif /* DEBUG */ /* For each pointer in the entry, remap it and walk the subtree. In general, linked lists are traversed while processing the entry