aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcov.c
AgeCommit message (Collapse)AuthorFilesLines
2001-11-06gcov.c (output_data): Use IS_ABSOLUTE_PATHNAME to test for absolute pathnames.Danny Smith1-6/+1
* gcov.c (output_data): Use IS_ABSOLUTE_PATHNAME to test for absolute pathnames. From-SVN: r46819
2001-11-01re PR other/704 (--help and --version)Joseph Myers1-32/+85
* Makefile.in (GCOV_OBJS): Add version.o. * gcov.c: Include "version.h" and <getopt.h>. (gcov_version_string): Remove. (print_usage): Take a parameter to determine whether this is a call from --help or an error message. Give fuller output that follows the GNU Coding Standards for --help. (print_version): New function. (options): New. (process_args): Use getopt_long. Support long options. Follow GNU Coding Standards for --help and --version. * doc/gcov.texi: Document long options. Addresses part of PR other/704. From-SVN: r46703
2001-10-19aclocal.m4 (AM_WITH_NLS): AC_DEFINE HAVE_LIBINTL_H and USE_INCLUDED_LIBINTL ↵Zack Weinberg1-12/+1
when appropriate. * aclocal.m4 (AM_WITH_NLS): AC_DEFINE HAVE_LIBINTL_H and USE_INCLUDED_LIBINTL when appropriate. * configure, config.in: Regenerate. * Makefile.in (datadir): Set to @datadir@. (intl.o): Also depend on $(CONFIG_H) and system.h. * intl.c: Factor out common gettext initialization sequence. (gcc_init_libintl): New function. * intl.h: Include intl/libgnuintl.h if USE_INCLUDED_LIBINTL; otherwise include libintl.h if HAVE_LIBINTL_H; otherwise turn off NLS. Add multiple include guard. No need to #ifdef-guard an #undef. Prototype gcc_init_libintl here. * collect2.c (main), cppmain.c (general_init), gcc.c (main), gcov.c (main), protoize.c (main), toplev.c (toplev_main): Use gcc_init_libintl. intl: * Makefile.in: Don't copy libgnuintl.h anywhere. From-SVN: r46348
2001-10-09c-common.c: Fix comment typos.Kazu Hirata1-1/+1
* c-common.c: Fix comment typos. * cfgrtl.c: Likewise. * collect2.c: Likewise. * cpplex.c: Likewise. * doloop.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * expr.c: Likewise. * fold-const.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * global.c: Likewise. * ifcvt.c: Likewise. * loop.c: Likewise. * optabs.c: Likewise. * protoize.c: Likewise. * regclass.c: Likewise. * reorg.c: Likewise. * rtl.h: Likewise. * stmt.c: Likewise. * tree.h: Likewise. * doc/cpp.texi: Likewise. * doc/c-tree.texi: Likewise. * doc/extend.texi: Likewise. * doc/invoke.texi: Likewise. * doc/objc.texi: Likewise. * doc/tm.texi: Likewise. From-SVN: r46114
2001-10-07builtins.c (expand_builtin_setjmp_receiver): Const-ify.Kaveh R. Ghazi1-1/+1
* builtins.c (expand_builtin_setjmp_receiver): Const-ify. * c-common.c (fname_var_t, c_tree_code_type, c_tree_code_length): Likewise. * c-dump.c (dump_option_value_info): Likewise. * c-format.c (format_length_info, format_char_info, format_flag_spec, format_flag_pair, format_kind_info): Likewise. * collect2.c (names): Likewise. * cppdefault.h (default_include): Likewise. * cppexp.c (suffix, vsuf_1, vsuf_2, vsuf_3): Likewise. * flow.c (life_analysis): Likewise. * gcc.c (dir_separator_str, modify_target, option_map, target_option_translations, spec_list_1, extra_specs_1, init_spec): Likewise. * gcov.c (gcov_version_string): Likewise. * genattr.c (write_units): Likewise. * genattrtab.c (make_length_attrs, write_function_unit_info): Likewise. * gengenrtl.c (rtx_definition, defs): Likewise. * genrecog.c (pred_table): Likewise. * global.c (global_alloc): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (find_free_reg): Likewise. * params.h (param_info): Likewise. * predict.c (predictor_info): Likewise. * protoize.c (unexpansion_struct): Likewise. * real.c (bmask): Likewise. * recog.h (insn_operand_data, insn_data): Likewise. * regclass.c (initial_fixed_regs, initial_call_used_regs): Likewise. * stmt.c (expand_nl_goto_receiver): Likewise. * toplev.c (da, debug_args, lang_opt, documented_lang_options, target_switches, target_options): Likewise. * tradcif.y (token, tokentab2, yylex): Likewise. * tree.h (attribute_spec): Likewise. * alpha.c (override_options, alpha_lookup_xfloating_lib_func): Likewise. * arc.c (arc_output_function_epilogue): Likewise. * arm.c (processors, all_cores, all_architectures, arm_override_options, isr_attribute_arg, isr_attribute_args, arm_isr_value): Likewise. * avr.c (mcu_type_s, reg_class_tab, order_regs_for_local_alloc): Likewise. * c4x.c (c4x_int_reglist): Likewise. * d30v.c (override_options): Likewise. * h8300.c (shift_insn): Likewise. * i386.c (size_cost, i386_cost, i486_cost, pentium_cost, pentiumpro_cost, k6_cost, athlon_cost, pentium4_cost, ix86_cost, ix86_expand_sse_comi, ix86_expand_sse_compare, override_options, builtin_description, bdesc_comi, bdesc_2arg, bdesc_1arg, ix86_init_mmx_sse_builtins, ix86_expand_builtin): Likewise. * i386.h (processor_costs, ix86_cost): Likewise. * m68hc11.c (m68hc11_cost, m6811_cost, m6812_cost): Likewise. * m68hc11.h (processor_costs, m68hc11_cost): Likewise. * m68k.c (codes_68881, codes_FPA): Likewise. * m88k.c (mode_from_align, max_from_align, all_from_align, best_from_align, m_options): Likewise. * m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise. * mcore.c (mode_from_align): Likewise. * mips/elf64.h (UNIQUE_SECTION): Likewise. * mips/iris6gld.h (UNIQUE_SECTION): Likewise. * mips.c (mips_sw_reg_names, mips_regno_to_class): Likewise. * mips.h (mips_regno_to_class): Likewise. * ns32k.c (scales): Likewise. * pa.c (import_string, magic_milli): Likewise. * rs6000.c (alt_reg_names, rs6000_override_options): Likewise. * sparc.c (leaf_reg_remap, sparc_override_options, reg_leaf_alloc_order, reg_nonleaf_alloc_order, reg_alloc_orders): Likewise. * sparc.h (sparc_cpu_select, leaf_reg_remap): Likewise. cp: * class.c (build_vtable_entry_ref): Const-ify. * decl.c (predefined_identifier, initialize_predefined_identifiers): Likewise. * init.c (build_new_1): Likewise. * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword): Likewise. f: * bad.c (_ffebad_message_, ffebad_messages_): Const-ify. * bld.c (ffebld_arity_op_): Likewise. * bld.h (ffebld_arity_op_): Likewise. * com.c (ffecom_init_0): Likewise. * intdoc.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, _ffeintrin_imp_, names, gens, imps, specs, cc_pair, cc_descriptions, cc_summaries): Likewise. * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, _ffeintrin_imp_, ffeintrin_names_, ffeintrin_gens_, ffeintrin_imps_, ffeintrin_specs_): Likewise. java: * jcf-io.c (format_uint): Const-ify. * lang.c (java_tree_code_type, java_tree_code_length): Likewise. * lex.c (java_get_line_col): Likewise. * parse.y (build_incdec): Likewise. From-SVN: r46062
2001-08-27emit-rtl.c: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.Andreas Jaeger1-13/+4
* emit-rtl.c: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout. * errors.c: Likewise. * final.c: Likewise. * dwarf2asm.c: Likewise. * doprint.c (checkit): Likewise. * diagnostic.c: Likewise. * collect2.c: Likewise. * calls.c: Likewise. * c-semantics.c (build_stmt): Likewise. * c-format.c (status_warning): Likewise. * c-errors.c (pedwarn_c99): Likewise. * builtins.c (validate_arglist): Likewise. * config/pj/pj.c (pj_printf): Likewise. * fix-header.c: Likewise. * gcc.c: Likewise. * gcov.c (fnotice): Likewise. * gensupport.c (message_with_line): Likewise. * mips-tfile.c: Likewise. * protoize.c (notice): Likewise. * read-rtl.c (fatal_with_file_and_line): Likewise. * rtl-error.c: Likewise. * tradcpp.c: Likewise. * tree.c: Likewise. * cp/tree.c (build_min_nt): Likewise. (build_min): Likewise. * cp/lex.c: Likewise. * cp/errfn.c: Likewise. * cp/rtti.c (create_pseudo_type_info): Likewise. From-SVN: r45185
2001-08-12gcc.c: Fix comment formatting.Kazu Hirata1-1/+1
* gcc.c: Fix comment formatting. * gccspec.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genemit.c: Likewise. * gengenrtl.c: Likewise. * genrecog.c: Likewise. * gensupport.c: Likewise. * ggc-page.c: Likewise. * global.c: Likewise. * graph.c: Likewise. * ifcvt.c: Likewise. * integrate.c: Likewise. * lcm.c: Likewise. * libgcc2.c: Likewise. * loop.c: Likewise. * mbchar.c: Likewise. * optabs.c: Likewise. * predict.c: Likewise. * prefix.c: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * reg-stack.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtlanal.c: Likewise. * rtl.c: Likewise. From-SVN: r44837
2001-07-30jump.c: Add prototype for mark_modified_reg.Andreas Jaeger1-22/+34
* jump.c: Add prototype for mark_modified_reg. * cse.c (set_live_p): Add unused attribute. * gcov.c (calculate_branch_probs): Use gcov_type to avoid overflow. (scan_for_source_files): Use long for count to avoid overflow. (output_data): Likewise. (output_data): Don't use string concatatenation to silence gcc -traditional. * predict.c: Fix typos and grammar. * gcse.c (insert_insn_end_bb): Remove unused variables. For cp: * decl2.c: Remove unused var global_temp_name_counter. From-SVN: r44479
2001-07-16gcov.c (output_data): Use HOST_WIDEST_INT_PRINT_DEC to output variables of ↵Andreas Jaeger1-16/+20
type HOST_WIDEST_INT. * gcov.c (output_data): Use HOST_WIDEST_INT_PRINT_DEC to output variables of type HOST_WIDEST_INT. * libgcc2.c (__bb_exit_func): Handle gcov_type as long long. (__bb_exit_func): Correct type of count_max to avoid overflow. (num_digits): Handle long long argument. * combine.c (gen_lowpart_for_combine): Remove unused variable. From-SVN: r44033
2001-07-11gcov.c (arcdata): Use gcov_type to fix branch percentage for large hit count.Janis Johnson1-2/+2
* gcov.c (arcdata): Use gcov_type to fix branch percentage for large hit count. From-SVN: r43944
2001-06-22regs.h (struct reg_info_def): Add freq field.Jan Hubicka1-11/+17
* regs.h (struct reg_info_def): Add freq field. (REG_N_REFS): Update comment. (REG_FREQ): New. * regclass.c (scan_one_insn): Update REG_FREQ. * flow.c (mark_set_1): Update REG_FREQ, make REG_N_SETS unweighted. (attempt_auto_inc): Likewise. (mark_used_reg): Likewise. (try_pre_increment_1): Likewise. * local-alloc.c (struct qty): Add freq field. (alloc_qty): Set freq. (update_equiv_regs): Set REG_FREQ. (QTY_CMP_PRI): Use freq. (combine_regs): Update qty->freq. * global.c (struct allocno): Update comment for n_refs; add freq field. (local_reg_freq): New array. (global_alloc): Update freq field; allocate and initialize local_reg_freq. (allocno_compare): Use freq field. (find_reg): Likewise. * reload1.c (count_pseudo): Use freq isntead of n_refs. (count_spilled_pseudo): Likewise. * tm.texi (GCOV_TYPE_SIZE): Document. * basic-block.h (gcov_type): Define. (struct edge_def): Use gcov_type for count field. (struct basic_block_def): Likewise. * defaults.h (GCOV_TYPE_SIZE): Define. * final.c (end_final): Use GCOV_TYPE_SIZE. * flow.c (dump_edge_info, dump_flow_info, dump_bb): Print count fields using HOST_WIDEST_INT_PRINT_DEC. * gcov-io.h (__fetch_gcov_type, __store_gcov_type, __read_gcov_type, __write_gcov_type): New. (store_long): Remove. * gcov.c (gcov_type): Set default. (struct adj_list): Use gcov_type for arc_count. (bb_info): Use gcov_type for succ_count, pred_count and exec_count. (create_program_flow_graph): Read arc_count properly. (solve_program_flow_graph): 'total' is gcov_type. (output_data): Line_counts is gcov_type, print it properly. * libgcc2.c (struct bb): Counts is gcov_type. (__bb_exit_func): Use __read_gcov_type and __write_gcov_type. * profile.c (LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE): Set default. (GCOV_TYPE_SIZE): Define. (struct bb_info): succ_count and pred_count is gcov_type. (compute_branch_probabilities): Use __read_gcov_type, print read edges to the dump file. (total): Is gcov_type. (gen_edge_profiler): Use GCOV_TYPE_SIZE. From-SVN: r43505
2000-12-17protoize.c (main): Correctly set locale categories.Philipp Thomas1-0/+7
2000-12-14 Philipp Thomas <pthomas@suse.de> * protoize.c (main): Correctly set locale categories. * gcc.c (main): Likewise. * cppmain.c (general_init): Likewise. * toplev.c (main): Likewise. * gcov.c (main): Likewise. * collect2.c (main): Likewise. From-SVN: r38331
2000-11-02* collect2.c (main, write_c_file_stat), gcc.c (translate_options,Joseph Myers1-8/+8
process_command, main), gcov.c (open_files, output_data), tlink.c (frob_extension, scan_linker_output), toplev.c (file_name_nondirectory): Use strchr () and strrchr () instead of index () and rindex (). cp: * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c (build_overload_value), repo.c (open_repo_file), xref.c (open_xref_file): Use strchr () and strrchr () instead of index () and rindex (). f: * com.c (open_include_file, ffecom_open_include_): Use strchr () and strrchr () instead of index () and rindex (). From-SVN: r37206
2000-02-25Fix copyrights.Jeff Law1-1/+2
From-SVN: r32175
2000-01-14eh-common.h: PROTO -> PARAMS.Kaveh R. Ghazi1-19/+19
* eh-common.h: PROTO -> PARAMS. * emit-rtl.c: Likewise. * errors.c: Likewise. * errors.h: Likewise. * except.c: Likewise. * except.h: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * fix-header.c: Likewise. * flow.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. From-SVN: r31419
2000-01-07cccp.c: Delete PATH_SEPARATOR, DIR_SEPARATOR and IS_DIR_SEPARATOR macros.Mumit Khan1-4/+0
2000-01-06 Mumit Khan <khan@xraylith.wisc.edu> * cccp.c: Delete PATH_SEPARATOR, DIR_SEPARATOR and IS_DIR_SEPARATOR macros. * collect2.c: Likewise. * cppinit.c: Likewise. * dwarf2out.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * prefix.c: Likewise. * rtl.c: Likewise. * toplev.c: Likewise. * system.h: And move to here. From-SVN: r31264
1999-11-10gcov.c (struct arcdata): Add hits and total, remove prob.Clinton Popetz1-19/+47
* gcov.c (struct arcdata): Add hits and total, remove prob. (output_branch_counts): New. (process_args): Set output_branch_counts if -c. (calculate_branch_probs): Store hits and total instead of percentage. (output_data): Emit counts if output_branch_counts is true. * gcov.texi (Invoking Gcov): Document -c switch.. From-SVN: r30476
1999-10-31[multiple changes]Richard Kenner1-5/+14
Fri Oct 29 15:25:07 1999 Arnaud Charlet <charlet@ACT-Europe.FR> * gcov.c (DIR_SEPARATOR): Provide default. (output_data): Add test for MS-DOS format absolute filename. (fancy_abort): Correct program name. (open_files): Open all files in binary mode. * libgcc2.c (__bb_exit_func): Likewise. * profile.c (init_branch_prob): Specify binary when opening files. * flags.h (flag_unwind_tables): New decl. * toplev.c (flag_unwind_table): New definition. (f_options): Add -funwind-tables. (decode_g_option): Clarify warning when unknown -g option is given. (rest_of_compilation): If inside an inlined external function, pretend we are just being declared. * dwarf2out.c (dwarf2out_do_frame): Check -funwind_tables. (dwarf2out_frame_finish): Likewise. Fri Oct 29 06:32:44 1999 Geoffrey Keating <geoffk@cygnus.com> * flow.c (propagate_block): When the last reference to a label before an ADDR_VEC is deleted because the reference is a dead store, delete the ADDR_VEC. Fri Oct 29 07:44:26 1999 Vasco Pedro <vp@di.fct.unl.pt> * fold-const.c (merge_ranges): In not in0, but in1, handle upper bounds equal like subset case. Thu Oct 28 19:22:24 1999 Douglas Rupp <rupp@gnat.com> * dbxout.c (dbxout_parms): Generate a second stabs line for parameters passed in a register but moved to the stack. Thu Oct 28 19:12:57 1999 Sam Tardieu <tardieu@act-europe.fr> * gcc.c (pass_exit_codes, greatest_status): New variables. (struct option_map): Add entry for "--pass-exit-codes". (execute): Update greatest_status if error. (display_help): Add documentation for -pass-exit-codes. (process_command): Handle -pass-exit-codes. (main): Look at pass_exit_codes and greatest_status on call to exit. Thu Oct 28 18:06:50 1999 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * reload.c (find_reloads): Refine test for no input reload case to not includes reloads emitted after insn. * function.c (find_temp_slots_from_address): Handle sum involving a register that points to a temp slot. (update_temp_slot_address): Make recursive call if both old and new are PLUS with a common operand. * calls.c (expand_call): Mark temp slot for result as having address taken. * rtlanal.c (reg_referenced_p, case IF_THEN_ELSE): New case. * gcc.c (process_command): Add standard_exec_prefix with "GCC" component as well as "BINUTILS". * integrate.h (copy_rtx_and_substitute): New arg, FOR_LHS. * integrate.c (copy_rtx_and_substitute): Likewise. (expand_inline_function, integrate_parm_decls, integrate_decl_tree): All callers changed. * unroll.c (inital_reg_note_copy, copy_loop_body): Likewise. * dbxout.c (dbxout_type, case INTEGER_TYPE_NODE): If can use gdb extensions, write size of type; also be more consistent in using references when this is a subtype. * pa.md (extv, extzv, insv): Use define_expand to reject constant that is out of range. * loop.c (unknown_constant_address_altered): New variable. (prescan_loop): Initialize it. (note_addr_stored): Set it for RTX_UNCHANGING_P MEM. (invariant_p, case MEM): Remove handling for volatile and readony; check new variable if readonly. (check_dbra_loop): Chdeck unknown_constant_address_altered. * cse.c (canon_hash, case MEM): Do not record if BLKmode. (addr_affects_sp_p): Removed from note_mem_written and only define #ifdef AUTO_INC_DEC. * alpha.c (input_operand, case ADDRESSOF): Treat as REG. * regclass.c (record_reg_classes): Properly handle register move directions. * varasm.c (initializer_constant_valid_p, case MINUS_EXPR): Don't think valid if both operands are invalid. (struct constant_descriptor): New field RTL. (mark_const_hash_entry): Mark it. (record_constant{,_rtx}): Initialize it. (output_constant_def): Allocate RTL in permanent obstack and save in table. ({record,compare}_constant_1): Modes must match for CONSTRUCTOR of ARRAY_TYPE. * c-common.h (initializer_constant_valid_p): Delete decl from here. * output.h (initializer_constant_valid_p): Move decl to here. * c-common.c (initializer_constant_valid_p): Delete function from here. * varasm.c (initializer_constant_valid_p): Move function to here. * tree.h (STRIP_SIGN_NOPS): New macro. * fold-const.c (optimize_minmax_comparison): New function. (invert_truthvalue, case WITH_RECORD_EXPR): New case. (fold): Use STRIP_SIGN_NOPS instead of STRIP_TYPE_NOPS. (fold, case EQ_EXPR): Call optimize_minmax_comparison and add cases with ABS_EXPR, NEGATE_EXPR, PLUS_EXPR, MINUS_EXPR, and widening conversions. (fold, case LE_EXPR): Rework changing unsigned to signed comparisons to look at size of mode, not precision of type; also add missing cases. (optimize_bit_field_compare, decode_field_reference): Don't try to optimize COMPONENT_REF of a PLACEHOLDER_EXPR. * dwarf2out.c (ctype.h): Include. (dwarf2out_set_demangle_name_func): New function. (size_of_line_info): Deleted. (output_line_info): Compute size of line info table from difference of labels. (base_type_die, add_name_attribute): Call demangle function, if any. (field_byte_offset): Use bits per word for variable length fields. (gen_array_type_die): Add array name. (gen_subprogram_die): Ignore DECL_INLINE if -fno-inline. (dwarf2out_add_library_unit_info): New function. * explow.c (set_stack_check_libfunc): New function. (stack_check_libfunc): New static variable. (probe_stack_range): Allow front-end to set up a libfunc to call. * combine.c (simplify_comparison): When making comparison in wider mode, check for having commuted an AND and a SUBREG. (contains_muldiv): New function. (try_combine): Call it when dividing a PARALLEL. (simplify_rtx, case TRUNCATE): Don't remove for umulsi3_highpart. (simplify_comparison, case ASHIFTRT): Recognize sign-extension of a PLUS. (record_value_for_reg): If TEM is a binary operation with two CLOBBERs, use one of the CLOBBERs instead. (if_then_else_cond): If comparing against zero, just return thing being compared. * optabs.c (expand_abs): If machine has MAX, ABS (x) is MAX (x, -x). Don't generate shifts and subtract if have conditional arithmetic. * rtl.h (delete_barrier): New declaration. * jump.c (jump_optimize): Set up to handle conditional call. In conditional arithmetic case, handle CALL_INSN followed by a BARRIER. (delete_barrier): New function. * rtl.c (read_rtx): Call fatal if bad RTL code; check for bad mode. * recog.c (nonmemory_operand): Accept ADDRESSOF. * tree.c (build_type_attribute_variant): Push to obstack of ttype around type_hash_canon call. * expr.c (placeholder_list): Move decl to file scope. (expand_expr): Don't force access to volatile just because its address is taken. If ignoring reference operations, just expand the operands. (expand_expr, case COMPONENT_REF): Propagate EXPAND_CONST_ADDRESS to recursive call when expanding inner. Refine test for using bitfield operations vs pointer punning. (expand_expr, case CONVERT_EXPR): If converting to BLKmode UNION_TYPE from BLKmode, just return inner object. Use proper mode in store_field call. Properly set sizes of object to store and total size in store_field call for convert to union. (expand_expr, case ARRAY_REF): If OP0 is in a register, put it in memory (like for ADDR_EXPR). Also, don't put constant in register if we'll want it in memory. (readonly_fields_p): New function. (expand_expr, case INDIRECT_REF): Call it if LHS. (expand_assignment): Handle a RESULT_DECL where DECL_RTL is a PARALLEL. (do_jump, case WITH_RECORD_EXPR): New case. (get_inner_reference): Always go inside a CONVERT_EXPR and NOP_EXPR if both modes are the same. (store_field): Use bitfield operations if size of bitsize is not same as size of RHS's type. Check for bitpos not a multiple of alignment in BLKmode case. Do block move in largest possible alignment. (store_constructor): Set BITSIZE to -1 for variable size and properly in case of array of BLKmode. (expand_expr_unaligned): New function. (do_compare_and_jump): Call it. * mips/iris5.h (SWITCHES_NEED_SPACES): New macro. * collect2.c (main): Only allow -ofoo if SWITCHES_NEED_SPACES does not include 'o'. * function.c (instantiate_virtual_regs_1, case SET): Handle case where both SET_DEST and SET_SRC reference a virtual register. (gen_mem_addressof): Copy RTX_UNCHANGING_P from new REG to old REG. * integrate.c (expand_inline_function): Handle case of setting virtual stack vars register (from built in setjmp); when parameter lives in memory, expand virtual_{stack_vars,incoming_args}_rtx early. (subst_constant): Add new parm, MEMONLY. (expand_inline_function, integrate_parm_decls): Pass new parm. (integrate_decl_tree): Likewise. (copy_rtx_and_substitute, case MEM): Do copy RTX_UNCHANGING_P. (try_constants): Call subst_constants twice, with MEMONLY 0 and 1. (copy_rtx_and_substitute, case SET): Add explicit calls to copy_rtx_and_substitute for both sides. * stmt.c (expand_asm_operands): Don't use TREE_STRING_LENGTH for constraints. (pushcase{,_range}): Convert to NOMINAL_TYPE after checking for within INDEX_TYPE, instead of before. (fixup_gotos): Use f->target_rtl, not the next insn, since latter may be from a later fixup. (expand_value_return): Correctly convert VAL when promoting function return; support RETURN_REG being a PARALLEL. (expand_return): When checking for result in regs and having cleanup, consider PARALLEL in DECL_RTL as being in regs. From-SVN: r30299
1999-10-03cpplib.c (if_directive_nameo): Add static prototype.Kaveh R. Ghazi1-0/+10
* cpplib.c (if_directive_nameo): Add static prototype. * cse.c (cse_insn): Remove unused variable `p'. * except.c (create_rethrow_ref, push_entry, receive_exception_label, new_eh_region_entry, find_func_region, clear_function_eh_region, process_nestinfo): Add static prototypes. (get_reg_for_handler): Hide definition. (process_nestinfo): Initialize variable `extra_handlers'. * expr.h (expand_builtin_longjmp): Add extern prototype. * final.c (final_addr_vec_align, align_fuzz): Add static prototypes. * function.c (prepare_function_start): Likewise. (pop_function_context_from): Mark parameter `context' with ATTRIBUTE_UNUSED. (push_temp_slots_for_block, flush_addressof): Hide definition. * gcov.c (init_arc, reverse_arcs, create_program_flow_graph, solve_program_flow_graph, calculate_branch_probs, function_summary, main, fancy_abort): Add prototypes. * gen-protos.c (add_hash, parse_fn_proto, main): Likewise. (add_hash): Constify a char*. * ggc-common.c (ggc_mark_rtx_ptr, ggc_mark_tree_ptr, ggc_mark_tree_varray_ptr, ggc_mark_tree_hash_table_ptr, ggc_mark_string_ptr, ggc_mark_tree_hash_table_entry): Add prototypes. * integrate.c (expand_inline_function_eh_labelmap): Likewise. * lists.c (free_list, zap_lists): Likewise. From-SVN: r29783
1999-09-07c-aux-info.c (concat): Don't define.Kaveh R. Ghazi1-29/+7
* c-aux-info.c (concat): Don't define. * cccp.c (my_strerror): Likewise. All callers changed to use xstrerror instead. (do_include): Call xstrdup, not xmalloc/strcpy. (grow_outbuf): Don't check if xrealloc returns NULL, it can't. (xmalloc, xrealloc, xcalloc, xstrdup): Don't define. * collect2.c (my_strsignal): Likewise. All callers changed to use strsignal instead. (locatelib): Call xstrdup, not xmalloc/strcpy. * 1750a.h (ASM_OUTPUT_INTERNAL_LABEL): Call xmalloc, not malloc. * dsp16xx.c (override_options): Call xstrdup, not xmalloc/strcpy. * i370.h (ASM_DECLARE_FUNCTION_NAME): Call xmalloc, not malloc. * mips.c (build_mips16_call_stub): Call xstrdup, not xmalloc/strcpy. * cppinit.c (cpp_options_init): Call xcalloc, not xmalloc/bzero. * dwarfout.c (dwarfout_init): Call concat, not xmalloc/strcpy/... * except.c (new_eh_region_entry): Call xmalloc/xrealloc, not malloc/realloc. (find_all_handler_type_matches): Likewise. Don't check return value. (get_new_handler, init_insn_eh_region, process_nestinfo): Call xmalloc, not malloc. (init_eh_nesting_info): Likewise. Call xcalloc, not xmalloc/bzero. * gcc.c (xstrerror, xmalloc, xrealloc): Don't define. (init_spec): Call xcalloc, not xmalloc/bzero. (set_spec): Call xstrdup, not save_string. (record_temp_file): Call xstrdup, not xmalloc/strcpy. (find_a_file): Call xstrdup, not xmalloc/strcpy. (process_command): Call xstrdup, not save_string. (main): Call xcalloc, not xmalloc/bzero. * gcov.c (xmalloc): Don't define. (create_program_flow_graph): Call xcalloc, not xmalloc/bzero. (scan_for_source_files): Call xstrdup, not xmalloc/strcpy. (output_data): Call xcalloc, not xmalloc/bzero. * haifa-sched.c (schedule_insns): Call xcalloc, not xmalloc/bzero. * mips-tdump.c (xmalloc): Don't define. (print_symbol): Call xmalloc, not malloc. (read_tfile): Call xcalloc, not calloc. * mips-tfile.c (xfree, my_strsignal, xmalloc, xcalloc, xrealloc): Don't define. All callers of xfree/my_strsignal changed to use free/strsignal instead. (allocate_cluster): Call xcalloc, not calloc. * objc/objc-act.c (lang_init): Call concat, not xmalloc/strcpy/... Fix memory leak, free allocated memory. * prefix.c (translate_name): Call xstrdup, not save_string. (update_path): Likewise. * profile.c (branch_prob): Call xstrdup, not xmalloc/strcpy. * protoize.c (xstrerror, xmalloc, xrealloc, xfree, savestring2): Don't define. Callers of xfree/savestring2 changed to use free/concat instead. * reload1.c (reload): Call xcalloc, not xmalloc/bzero. (init_elim_table): Likewise. * resource.c (init_resource_info): Likewise. * stupid.c (stupid_life_analysis): Likewise. * toplev.c (xmalloc, xcalloc, xrealloc, xstrdup): Don't define. (open_dump_file): Call concat, not xmalloc/strcpy/... (clean_dump_file): Likewise. (compile_file): Call xstrdup, not xmalloc/strcpy. From-SVN: r29148
1999-09-02combine.c (simplify_shift_const): Remove extra semicolon.Finn Hakansson1-1/+1
* combine.c (simplify_shift_const): Remove extra semicolon. * dwarf2out.c (remove_AT): Likewise. * expmed.c (expand_mult): Likewise. * gcov.c (create_program_flow_graph): Likewise. * reorg.c (mostly_true_jump): Likewise. From-SVN: r29050
1999-04-16system.h: Always prototype abort.Zack Weinberg1-0/+1
1999-04-16 22:44 -0400 Zack Weinberg <zack@rabi.columbia.edu> * system.h: Always prototype abort. Prototype fatal. Define abort to call fatal, not fprintf/exit. Define a stub macro for trim_filename. * toplev.c: Define DIR_SEPARATOR. (trim_filename): New function. * toplev.h: Prototype trim_filename, and #undef system.h's stub. * gcc.c, genattr.c, genattrtab.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, genopinit.c, genoutput.c, genpeep.c, genrecog.c: Make fatal non-static. * gcov.c, gengenrtl.c, protoize.c: #undef abort after including system.h. * config/i386/dgux.h, config/m68k/xm-amix.h: Remove stale code relating to abort. From-SVN: r26511
1999-03-18Warning fixes:Kaveh R. Ghazi1-2/+2
* cccp.c (default_include): Initialize structure memebers. (pass_thru_directive): Change the type of 'keyword_length' to int. (main): Cast `bindtextdomain' and `textdomain' to (void). * collect2.c (main): Likewise. * cppmain.c (main): Likewise. * gcc.c (main): Likewise. * gcov.c (main): Likewise. * protoize.c (main): Likewise. * toplev.c (main): Likewise. From-SVN: r25839
1999-01-30gcov.c (fnotice): Add missing FILE* parameter.Kaveh R. Ghazi1-12/+14
* gcov.c (fnotice): Add missing FILE* parameter. (function_summary): Fix format specifiers in calls to `fnotice'. (output_data): Likewise. * toplev.c (fnotice): Constify char* parameter. * toplev.h (fnotice): Add prototype. From-SVN: r24931
1999-01-30Copyright dates.Jeff Law1-1/+1
From-SVN: r24930
1999-01-30cccp.c (main): Only call setlocale (LC_MESSAGES, ...) if LC_MESSAGES is defined.Jeffrey A Law1-0/+2
* cccp.c (main): Only call setlocale (LC_MESSAGES, ...) if LC_MESSAGES is defined. * collect2.c (main): Likewise. * cppmain.c (main): Likewise. * gcc.c (main): Likewise. * gcov.c (main): Likewise. * protoize.c (main): Likewise. * toplev.c (main): Likewise. From-SVN: r24923
1999-01-26Merge in gcc2 snapshot 19980929. See gcc/ChangeLog and gcc/FSFChangeLog forJeffrey A Law1-39/+64
details. From-SVN: r24879
1999-01-11Update FSF address in copyright header.Jeff Law1-1/+2
From-SVN: r24614
1998-12-11cccp.c: Do not #include <sys/stat.h> here; this is already done by "system.h".Manfred Hollstein1-1/+0
� * cccp.c: Do not #include <sys/stat.h> here; this is already done by "system.h". * collect2.c: Likewise. * cpplib.h: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * getpwd.c: Likewise. * protoize.c: Likewise. * toplev.c: Likewise. From-SVN: r24263
1998-11-27system.h: Include libiberty.h.Kaveh R. Ghazi1-4/+3
* system.h: Include libiberty.h. * c-aux-info.c: Remove prototypes for concat/concat3. Change function `concat' from fixed parameters to variable parameters, as is done in libiberty. All callers of concat/concat3 changed to use the new `concat' with variable args. * cccp.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. * cexp.y: Likewise. * collect2.c: Likewise. * config/1750a/1750a.h: Likewise. * cppalloc.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * dyn-string.c: Likewise. * fix-header.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * gencheck.c: Likewise. * gencodes.c: Likewise. * genconfig.c: Likewise. * genemit.c: Likewise. * genextract.c: Likewise. * genflags.c: Likewise. * gengenrtl.c: Likewise. * genopinit.c: Likewise. * genoutput.c: Likewise. * genpeep.c: Likewise. * genrecog.c: Likewise. * getpwd.c: Likewise. * halfpic.c: Likewise. * hash.c: Likewise. * mips-tdump.c: Likewise. Wrap malloc/realloc/calloc prototypes in NEED_DECLARATION_* macros. * mips-tfile.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. (fatal): Fix const-ification of variable `format' in !ANSI_PROTOTYPES case. * prefix.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. * print-rtl.c: Rename variable `spaces' to `xspaces' to avoid conflicting with function `spaces' from libiberty. * profile.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. * protoize.c: Likewise. * rtl.h: Likewise. * scan.h: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tree.h: Likewise. From-SVN: r23931
1998-11-07configure.in (host_xm_file, [...]): Arrange to include gansidecl.h in ↵Kaveh R. Ghazi1-1/+0
{ht}config.h & tm.h just before the config/... * configure.in (host_xm_file, build_xm_file, xm_file, tm_file): Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/ directory headers. (tm_file_list, host_xm_file_list, build_xm_file_list): Handle gansidecl.h in the list of dependencies. * Makefile.in (RTL_BASE_H): Don't depend on gansidecl.h. (TREE_H, DEMANGLE_H, RECOG_H, REGS_H, libgcc2.a, stmp-multilib, mbchar.o, collect2.o, pexecute.o, vfprintf.o, splay-tree.o, gcc.o, gencheck.o, choose-temp.o, mkstemp.o, mkstemp.o, prefix.o, dyn-string.o, cexp.o, cccp.o, cppmain.o, cpplib.o, cpperror.o, cppexp.o, cppfiles.o, cpphash.o, cppalloc.o, scan-decls.o): Likewise. * cccp.c: Don't include gansidecl.h. * cexp.y: Likewise. * collect2.c: Likewise. * config/c4x/c4x.c: Likewise. * config/v850/v850.h: Likewise. * cppalloc.c: Likewise. * cpperror.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * cppmain.c: Likewise. * cppulp.c: Likewise. * demangle.h: Likewise. * doprint.c: Likewise. * dyn-string.c: Likewise. * eh-common.h: Likewise. * fix-header.c: Likewise. * frame.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * gen-protos.c: Likewise. * gencheck.c: Likewise. * halfpic.h: Likewise. * hash.c: Likewise. * machmode.h: Likewise. * mbchar.c: Likewise. * prefix.c: Likewise. * protoize.c: Likewise. * recog.h: Likewise. * rtl.h: Likewise. * scan-decls.c: Likewise. * tree.h: Likewise. * varray.h: Likewise. From-SVN: r23558
1998-10-14Add ATTRIBUTE_NORETURN in a bunch of places:Kaveh R. Ghazi1-1/+1
* cppalloc.c (memory_full): Mark function prototype with ATTRIBUTE_NORETURN. * demangle.h (collect_exit): Likewise. * fix-header.c (v_fatal, fatal): Likewise. * gcc.c (pfatal_with_name, pfatal_pexecute, fatal, fancy_abort): Likewise. * gcov.c (print_usage): Likewise. * genattr.c (fatal, fancy_abort): Likewise. * genattrtab.c (fatal, fancy_abort): Likewise. * gencodes.c (fatal, fancy_abort): Likewise. * genconfig.c (fatal, fancy_abort): Likewise. * genemit.c (fatal, fancy_abort): Likewise. * genextract.c (fatal, fancy_abort): Likewise. * genflags.c (fatal, fancy_abort): Likewise. * genopinit.c (fatal, fancy_abort): Likewise. * genoutput.c (fatal, fancy_abort): Likewise. * genpeep.c (fatal, fancy_abort): Likewise. * genrecog.c (fatal, fancy_abort): Likewise. * libgcc2.c (__eprintf, __default_terminate, __sjthrow, __sjpopnthrow, __throw): Likewise. * objc/objc-act.c (objc_fatal): Likewise. * protoize.c (usage, aux_info_corrupted, declare_source_confusing): Likewise. * rtl.c (dump_and_abort): Likewise. * rtl.h (sets_cc0_p): Likewise. * toplev.c (float_signal, pipe_closed): Likewise. From-SVN: r23084
1998-10-12update copyrightMichael Meissner1-1/+1
From-SVN: r23026
1998-10-09flow.c (print_rtl_with_bb): Changed type of in_bb_p to match use.Graham Stott1-2/+2
Fri Oct 9 16:03:19 1998 Graham <grahams@rcp.co.uk> * flow.c (print_rtl_with_bb): Changed type of in_bb_p to match use. * gcc.c (add_preprocessor_option): Correct typo when allocating memory, sizeof() argument had one too many `*'. (add_assembler_option): Likewise. (add_linker_option): Likewise. * gcov.c (output_data): Likewise. * local-alloc.c (memref_used_between_p): Likewise. (update_equiv_regs): Likewise. * loop.c (strength_reduce): Likewise. * reg-stack.c (record_asm_reg_life): Likewise. (subst_asm_stack_reg): Likewise. * reorg.c (dbr_schedule): Likewise. From-SVN: r22964
1998-06-20flow.c (allocate_for_life_analysis, [...]): Remove declaration.H.J. Lu1-0/+1
* flow.c (allocate_for_life_analysis, init_regset_vector): Remove declaration. * function.h (get_first_block_beg): New declaration. * gbl-ctors.h (__do_global_dtors): Add prototype. * gcov-io.h (__fetch_long): New declaration. (__store_long): Likewise. (__read_long): Likewise. (__write_long): Likewise. * gcov.c (print_usage): New declaration. * Makefile.in (c-iterate.o): Depend on insn-codes.h too. From-SVN: r20631
1998-03-30More cutover to system.h:Kaveh R. Ghazi1-24/+7
* Makefile.in (cppalloc.o, cpperror.o, cppexp.o, cpphash.o, cpplib.o, cppmain.o, fix-header.o, gcov.o, gen-protos.o, gengenrtl.o, halfpic.o, hash.o, scan-decls.o, scan.o): Depend on system.h. * cpphash.c: Include config.h. * cppalloc.c: Include system.h. Add parameters to various function prototypes. * cpperror.c: Likewise. * cppexp.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * cppmain.c: Likewise. * fix-header.c: Likewise. * gcov.c: Likewise. * gen-protos.c: Likewise. * gengenrtl.c: Likewise. * halfpic.c: Likewise. * hash.c: Likewise. * scan-decls.c: Likewise. * scan.c: Likewise. From-SVN: r18911
1997-12-20bitmap.c (bitmap_clear): Ensure `inline' is at the beginning of the declaration.Kaveh R. Ghazi1-26/+38
* bitmap.c (bitmap_clear): Ensure `inline' is at the beginning of the declaration. * c-decl.c (finish_decl): Use parentheses around && within ||. * rtl.c: Include stdlib.h. (read_skip_spaces): Add parentheses around assignments used as truth values. (read_rtx): Initialize list_rtx. * cppexp.c (parse_number): Use || when operands are truth values. * alias.c (find_base_value): Add default case. (memrefs_conflict): Likewise. * combine.c (sets_function_arg_p): Likewise. * genemit.c (gen_exp): Likewise. * local-alloc.c (contains_replace_regs): Likewise. * rtlanal.c (jmp_uses_reg_or_mem): Likewise. * fold-const.c (fold_convert): Use "&&" for truth values. (fold): Add default case. * sdbout.c (sdbout_field_types): Fix typo in declaration. (sdbout_one_type): Add default case. * alpha.c (alpha_sa_mask): Prototype only if OPEN_VMS. (some_operand): Add default case. (input_operand): Likewise. (signed_comparison_operator): Likewise. (divmod_operator): Likewise. (alpha_set_memflags_1): Likewise. * reload1.c (reload_cse_simplify_operands): Ensure function always returns a value. * scan-decls.c (scan_decls): Likewise. * c-lex.c (skip_white_space): Fix typo in declaraion. * c-typeck.c (comp_target_types): Add parentheses around assignment used as truth value. (print_spelling): Likewise. (constructor_implicit, constructor_result): Remove unused variables. * collect2.c (scan_library): Protect prototype with #ifdef SCAN_LIBRARIES. * emit-rtl.c (find_line_note): Fix typo in declaration. * final.c (asm_insn_count): Protect prototype with #ifdef HAVE_ATTR_length. * flow.c (find_auto_inc): Protect prototype with #ifdef AUTO_INC_DEC. (try_pre_increment_1, try_pre_increment): Likewise. * regclass.c (auto_inc_dec_reg_p): Protect prototype with #ifdef FORBIDDEN_INC_DEC_CLASSES. Make return type explicit. * gcov-io.h (__store_long, __write_long, __read_long): Fix unsigned/signed comparisons. * gcov.c (read_files): Remove unused "first_type" variable. (scan _for_source_files): Initialize s_ptr. (function_summary): Eliminate "%lf" formatting, use %ld for longs. (output_data): Initialize branch_probs and last_line_num. Eliminate "%lf" formatting, use "%ld" for longs. Co-Authored-By: Jeffrey A Law <law@cygnus.com> From-SVN: r17158
1997-05-06reformat a little to match GNU coding standards.Mike Stump1-4/+4
From-SVN: r14024
1997-04-20Use symbolic codes for exit.Richard Kenner1-3/+2
From-SVN: r13938
1997-04-13(print_usage, open_files): Use FATAL_EXIT_CODE.Richard Kenner1-4/+4
From-SVN: r13884
1997-03-28Initial revisionDoug Evans1-0/+1380
From-SVN: r13824