Commit Graph

1560 Commits

Author SHA1 Message Date
Nathanael Nerode eaf9f3b2e9 Makefile.tpl: Remove BUILD_CC stuff.
(toplev)
	* Makefile.tpl: Remove BUILD_CC stuff.
	* Makefile.in: Regenerate.
(gcc)
	* configure.in: Replace BUILD_CC references with CC_FOR_BUILD.
	* configure: Regenerate.
	* Makefile.in: Replace BUILD_CC references with CC_FOR_BUILD.
(gcc/f)
	* Make-lang.in: Replace BUILD_CC references with CC_FOR_BUILD.

From-SVN: r68115
2003-06-17 21:53:49 +00:00
Andreas Jaeger 5b0e2409f7 rtl.h: Remove declarations from coverage.h.
* rtl.h: Remove declarations from coverage.h.
	* toplev.c: Include coverage.h.
	* Makefile.in (toplev.o): Depend on coverage.h.

	* toplev.h: Remove extra declaration of print_time.

	* gengtype.c (close_output_files): Remove duplicated declaration.

From-SVN: r68066
2003-06-17 07:09:13 +02:00
Richard Kenner f0c4fac7fe * Makefile.in (install-mkheaders): Use INSTALL_SCRIPT for scripts.
From-SVN: r68032
2003-06-16 15:00:37 -04:00
Nathan Sidwell fd3acbb3a2 function.h (struct emit_status): Remove x_last_linenum, x_last_filename.
* function.h (struct emit_status): Remove x_last_linenum,
	x_last_filename. Add x_last_location.
	* rtl.h: #include "input.h".
	(NOTE_DATA): New.
	* cfglayout.c (duplicate_insn_chain): Use emit_line_note for line
	number notes.
	* emit-rtl.c (last_linenum, last_filename): Remove.
	(last_location): New.
	(emit_line_note_after): LINE must always be >= 0.
	(emit_line_note): Likewise. Check not duplicate here...
	(emit_note): ... rather than here.
	(emit_line_note_force, force_next_line_note, init_emit): Adjust.
	* integrate.c (expand_inline_function): Use emit_line_note for
	line number notes.
	(copy_insn_list): Likewise.
	* unroll.c (copy_loop_body): Likewise.
	* Makefile.in (RTL_H): Add input.h.

From-SVN: r68002
2003-06-16 08:27:05 +00:00
Richard Kenner 84fb201905 Makefile.in (stagefeedback-start): Use $(SUBDIRS) instead of knowing names of language subdirectories.
* Makefile.in (stagefeedback-start): Use $(SUBDIRS) instead of
	knowing names of language subdirectories.

From-SVN: r67972
2003-06-15 09:12:58 -04:00
Neil Booth d7b4261875 Makefile.in: Update to use common.opt and lang_opt_files.
* Makefile.in: Update to use common.opt and lang_opt_files.
	(c-options.c, c-options.h): Remove.
	(options.c, options.h): Add.
	* c-opts.c: Include options.h not c-options.h.
	* common.opt: New file.
	* configure, configure.in: Add lang_opt_files.
	* opts.c: Include flags.h and diagnostic.h.
	(common_handle_option): New.
	(handle_option): Update to recognize common options and all
	language-dependent options.
	* opts.h (CL_F77, CL_JAVA, CL_ADA, CL_COMMON, CL_TREELANG): New.
	(struct cl_option): Make flags of type int.
	* opts.h: Flag option with front ends to which it applies.
	Handle duplicate options.
	* toplev.c (filename): Remove.
	(independent_decode_option): Don't handle filenames and -quiet.
	(process_options, do_compile): Update.
ada:
	* Make-lang.in: Update to use options.c and options.h.
	* misc.c: Include options.h not aoptions.h.
	(gnat_handle_option): Abort on unrecognized switch.
	(gnat_init_options): Request Ada switches.
cp:
	* Make-lang.in: Remove c-options.o.
f:
	* Make-lang.in: Update to use options.c and options.h.
	* top.c: Include options.h not f-options.h.
	(gnat_handle_option): Abort on unrecognized switch.
	(ffe_init_options): From com.c.  Request F77 options.
	(ffe_handle_options): Abort on unrecognized switch.
	* com.c (ffe_init_options): Move to top.c.
	* top.h (fee_init_options): New.
java:
	* Make-lang.in: Update to use options.c and options.h.
	* lang.c: Include options.h not j-options.h.
	(java_handle_option): Abort on unrecognized option.
	(java_init_options): Request Java switches.
treelang:
	* Make-lang.in: Update to use options.c and options.h.
	* tree1.c: Include options.h not t-options.h.
	(treelang_init_options): New.
	(treelang_handle_option): Abort on unrecognized switch.
	* treetree.c (LANG_HOOKS_INIT_OPTIONS): Override.
	* treetree.h (treelang_init_options): New.

From-SVN: r67941
2003-06-14 12:26:36 +00:00
Nathanael Nerode 4665e56c27 Makefile.in, [...]: Replace "build_canonical" with build, "host_canonical" with host.
* Makefile.in, configure.in, config/m68hc11/t-m68hc11-gas:
	Replace "build_canonical" with build, "host_canonical" with host.
	* configure.in: Use GCC_TOPLEV_SUBDIRS.
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerate.
(ada)
	* Makefile.in: Replace "host_canonical" with "host" for autoconf
	substitution.

From-SVN: r67691
2003-06-10 00:52:18 +00:00
Jan Hubicka 0435312e38 cfglayout.c (insn_scope): New static function
* cfglayout.c (insn_scope): New static function
	(block_locators_*, line_locators*, file_locators*): New static varrays.
	(scope_to_insns_initialize): Use them.
	(insn_line, insn_file): New functions.
	(scope_to_insns_finalize): Use insn_scope.
	(prologue_locator, epilogue_locator): New global variables.
	* emit-rt.c (try_split, make_insn_raw, make_jump_insn_raw,
	make_call_insn_raw, emit_copy_of_insn_after): Use locators.
	(emit_insn_after_scope, emit_insn_before_scope
	emit_jump_insn_after_scope, emit_jump_insn_before_scope
	emit_call_insn_after_scope, emit_call_insn_before_scope): Rename to...
	(emit_insn_after_setloc, emit_insn_before_setloc
	emit_jump_insn_after_setloc, emit_jump_insn_before_setloc
	emit_call_insn_after_setloc, emit_call_insn_before_setloc): ... these;
	use locators.
	* final.c (notice_source_line): Use locators.
	(final_start_function): Set initial source file and line.
	(final_scan_insn): Use locators.
	* ifcvt.c (noce_try_store_flag, noce_try_store_flag_constants,
	noce_try_addcc, noce_try_store_flag_mask, noce_try_cmove,
	noce_try_cmove_arith, noce_try_minmax, noce_try_abs,
	noce_process_if_block, find_cond_trap): Likewise.
	* integrate.c (copy_insn_list): Likewise.
	* jump.c (duplicate_loop_exit_test): LIkewise.
	* print-rtl.c (print_rtx): Print locators.
	* recog.c (peephole2_optimize): Likewise.
	* rtl.h (INSN_SCOPE): Remove.
	(emit_insn_after_scope, emit_insn_before_scope
	emit_jump_insn_after_scope, emit_jump_insn_before_scope
	emit_call_insn_after_scope, emit_call_insn_before_scope): Rename to...
	(emit_insn_after_setloc, emit_insn_before_setloc
	emit_jump_insn_after_setloc, emit_jump_insn_before_setloc
	emit_call_insn_after_setloc, emit_call_insn_before_setloc): ... these;
	(insn_file, insn_line, prologue_locator, epilogue_locator): Declare.
	* unroll.c (copy_loop_body): Use locators.
	* function.c (set_insn_locators): New function.
	(thread_prologue_and_epilogue_insns): Set the locators accordingly.

From-SVN: r67637
2003-06-08 19:35:54 +00:00
Neil Booth 147d396eaa * Makfile.in, cp/Make-lang.in: Forgotten commit.
From-SVN: r67616
2003-06-08 07:55:18 +00:00
Jan Hubicka 8c560c809f Makefile.in (stageprofile_build): Kill redundant target.
* Makefile.in (stageprofile_build): Kill redundant target.
	* i386.c (mdep_reorg): Don't pad jumps for Athlon.

From-SVN: r67586
2003-06-07 13:23:09 +00:00
Neil Booth 2772ef3ef3 Makefile.in (OJBS, c-opts.o): Update.
* Makefile.in (OJBS, c-opts.o): Update.
	(c-options.c, c-options.h): Rename options.h and options.c.
	(options.h): Rename options_.h.
	(opts.o): New.
	* c-common.h (c_common_handle_option): Replace c_common_decode_option.
	(c_common_init_options): Update prototype.
	* c-lang.c (c_init_options): Update prototype.
	(LANG_HOOKS_HANDLE_OPTION): Override.
	(LANG_HOOKS_DECODE_OPTION): Drop.
	* c-opts.c: Include opts.h and options.h instead of c-options.h
	and c-options.c.
	(lang_flags): Move to file scope.
	(find_opt, c_common_decode_option): Remove.
	(CL_C, CL_OBJC, CL_CXX, CL_OBJCXX, CL_JOINED, CL_SEPARATE,
	CL_REJECT_NEGATIVE): Move to opts.h.
	(missing_arg): Update prototype.
	(c_common_init_options): Update for new prototype.
	(c_common_handle_options): Filenames are passed as N_OPTS.
	* hooks.c (hook_int_void_0): New.
	* hooks.h (hook_int_void_0): New.
	* langhooks-def.h (LANG_HOOKS_INIT_OPTIONS): New default.
	(LANG_HOOKS_HANDLE_OPTION): Default to NULL for now.
	(LANG_HOOKS_INITIALIZER): Update.
	* langhooks.h (init_options): Update.
	(handle_option): New.
	* opts.c, opts.h: New files.
	* opts.sh: Update c file to include opts.h and options.h.
	* toplev.c: Include opts.h; change options.h to options_.h.
	(parse_options_and_default_flags): Get lang_mask, use
	handle_option for language-specific handling.
	* objc/objc-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
	(LANG_HOOKS_HANDLE_OPTION): Override.
	(objc_init_options): Update.
ada:
	* misc.c (gnat_init_options): Update.
cp:
	* cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
	(LANG_HOOKS_HANDLE_OPTION): Override.
	* cp-tree.h (cxx_init_options): Update.
	* lex.c (cxx_init_options): Update.
f:
	* com.c (ffe_init_options): Update.
java:
	* lang.c (java_init_options): Update.

From-SVN: r67584
2003-06-07 11:10:46 +00:00
Magnus Kreth 3743ea0569 re PR other/7031 (program-suffix not respected in make install)
PR other/7031
* Makefile.in (install-common): Remove GCOV_INSTALL_NAME instead of
gcov.

Co-Authored-By: Thibaud Gaillard <thibaud.gaillard@nto.atmel.com>

From-SVN: r67582
2003-06-07 00:38:32 -07:00
Nathanael Nerode 6a1b7268b9 configure.in: Make $(target_subdir) correspond with top level usage.
* configure.in: Make $(target_subdir) correspond with top level usage.
	* Makefile.in: Likewise.
	* configure: Regenerate.

From-SVN: r67575
2003-06-07 02:51:06 +00:00
Jan Hubicka 9ee634e345 function.c (FLOOR_ROUND, CEIL_ROUND): Fix.
* function.c (FLOOR_ROUND, CEIL_ROUND): Fix.
	* i386.md (gen_pro_epilogue_adjust_stack): Deal with gigantic stack frames.
	(pro_epilogue_adjust_stack_rex64_2): New pattern

	* cfghooks.h, cfghooks.c: New files.
	* Makefile.in (BASIC_BLOCK_H): Depends on cfghooks.h.
	(OBJS): Add cfghooks.o.
	(cfghooks.o): New rule.
	* basic-block.h (split_edge): Rename to rtl_split_edge.
	(verify_flow_info): Rename to rtl_verify_flow_info.
	(cfghooks.h): Included here.
	* cfgrtl.c (split_edge): Renamed rtl_split_edge.
	(verify_flow_info): Renamed rtl_verify_flow_info.
	* toplev.c (rest_of_compilation): Call rtl_register_cfg_hooks.

	* basic-block.h (split_block, split_edge, flow_delete_block,
	redirect_edge_and_branch, redirect_edge_and_branch_force): Delete.
	(flow_delete_block_noexpunge):  Return void.
	* cfg.c (verify_flow_info): New function.
	* cfgcleanup.c (try_simplify_condjump, outgoing_edges_match,
	try_crossjump_to_edge, try_optimize_cfg, delete_unreachable_blocks):
	Use delete_block.
	* cfglayout.c (function_footer): Rename to...
	(cfg_layout_function_footer): ... this variable
	(unlink_insn_chain): Make global.
	(fixup_reorder_chain, record_effective_endpoints): Update.
	(cleanup_unconditional_jumps): Use delete_block.
	(cfg_layout_redirect_edge, cfg_layout_split_block): Move to cfgrtl.c
	(cfg_layout_duplicate_bb): Use redirect_edge_and_branch_force.
	(cfg_layout_initialize, cfg_layout_finalize): Update hooks.
	* cfglayout.h (cfg_layout_redirect_edge, cfg_layout_split_block):  Delete.
	(cfg_layout_function_footer): Declare.
	* cfgloopmanip (split_loop_bb): Do not update RBI.
	(remove_bbs): Use delete_block.
	(loop_reidrect_edge, loop_delete_branch_edge): Use
	redirect_edge_and_branch.
	(create_preheader): Use split_block and redirect_edge_and_branch_force.
	(split_edge_with): Likewise.
	* cfgrtl.c: Include cfglayout.h
	(split_edge): Rename to ...
	(rtl_split_edge) ... this one; make local.
	(redirect_edge_and_branch): Rename to ...
	(rtl_redirect_edge_and_branch) ... this one; make local.
	(redirect_edge_and_branch_force): Rename to ...
	(rtl_redirect_edge_and_branch_force) ... this one; make local.
	(cfg_layout_delete_block, cfg_layout_delete_edge_and_branch_force): New.
	(cfg_layout_redirect_edge_and_branch, cfg_layout_split_block): Move here from
	cfglayout.c; update to directly call RTL counterparts.
	(rtl_cfg_hooks, cfg_layout_rtl_cfg_hooks): New functions.
	* ifcvt.c (find_cond_trap): Use delete_block.
	(find_if_case_1): Use delete_block.
	(find_if_case_2): Use delete_block.
	* rtl.h (unlink_insn_chain): Declare.
	* toplev.c (rtl_reigster_cfg_hooks): New.

From-SVN: r67535
2003-06-06 09:24:26 +00:00
Phil Edwards 3d81863273 * Makefile.in (qmtest-g++): Use target_alias, not target.
From-SVN: r67520
2003-06-06 00:01:32 +00:00
Jan Hubicka 8f231b5d87 install.tex: Document profiledbootstrap.
* install.tex: Document profiledbootstrap.

	* Makefile.tpl (profiledbootstrap): New target.
	* Makefile.in (profiledbootstrap): New target.

	* Makefile.in (clean, distclean): Kill new stages
	(POSTSTAGE1_FLAGS_TO_PASS): Break from ...
	(STAGE2_FLAGS_TO_PASS): ... this one.
	(STAGEPROFILE_FLAGS_TO_PASS, STAGEFEEDBACK_FLAGS_TO_PASS): New.
	(stage[2-4]_build): Add POSTSTAGE1_FLAGS_TO_PASS.
	(stageprofile_build, stageprofile_copy, stagefeedback_build,
	stagefeedback_copy): New.
	(restageprofile, restagefeedback, stageprofile-start,
	stageprofile, stagefeedback-start): Likewise.

	* Make-lang.in:  Add support for stageprofile and stagefeedback

From-SVN: r67498
2003-06-05 16:36:12 +00:00
Mark Mitchell d7068b3d2a Makefile.in (QMTESTRUNFLAGS): Set for DejaGNU emulation.
* Makefile.in (QMTESTRUNFLAGS): Set for DejaGNU emulation.
	(QMTEST_GPP_TESTS): Use "g++" by default.
	(stamp-qmtest): Tweak database creation.
	(QMTEST_DIR/context): Update context file format.
	(qmtest-g++): Tweak command-line.

	* README.QMTEST: Update.

From-SVN: r67474
2003-06-05 00:17:16 +00:00
Kaveh R. Ghazi 6b6600bd8e Makefile.in (varasm.o): Don't set -Wno-error.
* Makefile.in (varasm.o): Don't set -Wno-error.
	* rs6000/t-rs6000 (varasm.o, out_object_file): Don't clear.

From-SVN: r67469
2003-06-04 23:21:26 +00:00
Richard Henderson 0bfa5f65bf c-common.c (handle_cleanup_attribute): New.
* c-common.c (handle_cleanup_attribute): New.
        (c_common_attributes): Add it.
        * c-decl.c (finish_decl): Honor the cleanup attribute.
        * doc/extend.texi (Variable Attributes): Document it.

        * unwind-c.c: New file.
        * Makefile.in (LIB2ADDEH): Add it.
        * config/t-darwin, config/t-linux, config/t-linux-gnulibc1,
        config/ia64/t-ia64: Likewise.

        * gcc.dg/cleanup-1.c: New.
        * gcc.dg/cleanup-2.c: New.
        * gcc.dg/cleanup-3.c: New.
        * gcc.dg/cleanup-4.c: New.
        * gcc.dg/cleanup-5.c: New.
        * gcc.dg/cleanup-6.c: New.
        * gcc.dg/cleanup-7.c: New.

From-SVN: r67449
2003-06-04 10:06:00 -07:00
Zdenek Dvorak 9bf8cfbfcd Makefile.in (cse.o): Add params.h dependency.
* Makefile.in (cse.o): Add params.h dependency.
	* cse.c: Include params.h.
	(PATHLENGTH): Removed.
	(struct cse_basic_block_data): Make path array dynamic.
	(cse_end_of_basic_block): Use PARAM_MAX_CSE_PATH_LENGTH instead of PATHLENGTH.
	(cse_main, cse_basic_block): Allocate path array.
	* params.def (PARAM_MAX_CSE_PATH_LENGTH): New.

From-SVN: r67433
2003-06-04 07:51:41 +00:00
Richard Henderson 2ef0a55511 optabs.c (expand_abs_nojump): Split out from ...
* optabs.c (expand_abs_nojump): Split out from ...
        (expand_abs): ... here.
        * optabs.h (expand_abs_nojump): Declare.
        * ifcvt.c: (noce_try_abs): Use expand_abs_nojump.
        * Makefile.in (ifcvt.o): Depend on optabs.h.

From-SVN: r67404
2003-06-03 14:29:48 -07:00
Douglas B Rupp 6f6a3861aa *** empty log message ***
From-SVN: r67399
2003-06-03 20:22:20 +00:00
Kaveh R. Ghazi e7aba4cdb2 Makefile.in (c-options.c): Pass in $(AWK) to opts.sh.
* Makefile.in (c-options.c): Pass in $(AWK) to opts.sh.
	(mostlyclean): Delete c-options.c and c-options.h.

From-SVN: r67326
2003-06-02 11:41:51 +00:00
Neil Booth e11a4ae53f Makefile.in (c-options.c, [...]): Parallel make safe.
* Makefile.in (c-options.c, c-options.h): Parallel make safe.
	* c.opt: End in blank line.
	* opts.sh: Take AWK from environment if available; use C locale.

From-SVN: r67305
2003-06-01 18:24:08 +00:00
Neil Booth fef3106c7b Makefile.in (c-opts.o, [...]): Update dependencies.
* Makefile.in (c-opts.o, c-options.h): Update dependencies.
	* c-opts.c: Include c-options.h and c-options.c.
	(CL_C_ONLY, CL_OBJC_ONLY, CL_CXX_ONLY, CL_OBJCXX_ONLY):
	Rename CL_C, CL_OBJC, CL_CXX, CL_OBJCXX.
	(CL_ARG, CL_ALL, COMMAND_LINE_OPTIONS, struct cl_option,
	OPT, opt_comp): Remove.
	(missing_arg, c_common_init_options, c_common_decode_option,
	write_langs): Update for macro redefinitions and enumeration
	name changes.
	* c.opt, opts.sh: New files.
	* doc/passes.texi: Update.

From-SVN: r67278
2003-05-31 21:18:21 +00:00
Jason Merrill a7db751ae5 * Makefile.in (unstrap): Remove stage_last after make unstage1.
From-SVN: r67233
2003-05-29 19:05:39 -04:00
Roger Sayle d90f988266 re PR bootstrap/10169 (Bootstrap fails on mainline with Tru64 5.1B)
PR bootstrap/10169
	* mips-tfile.c (main): Use getopt_long instead of getopt.
	Add new command line option --version to display version.
	Treat --verbose like -v to report a single line version.
	(options): New global variable for getopt_long.
	* mips-tdump.c (main): Use getopt_long instead of getopt.
	New command line options -v, --version and -verbose to display
	the program version number (to match mips-tfile's behavior).
	(options): New global variable for getopt_long.

	* gcov.c (options): Zero-terminate getopt_long array.
	* gcov-dump.c (options): Likewise.

	* Makefile.in (mips-tdump.o): Add dependency on version.h.

Co-Authored-By: Kaveh R. Ghazi <ghazi@caip.rutgers.edu>

From-SVN: r67230
2003-05-29 21:33:35 +00:00
Nathan Sidwell 990f4800f2 Makefile.in (LIBGCC_DEPS): Use $(srcdir) on gcov files
* Makefile.in (LIBGCC_DEPS): Use $(srcdir) on gcov files
	(libgcov.a): Depend on libgcc.a.
	(gcov.o, gcov-dump.o): Add gcov-io.c.
	* mklibgcc.in (libgcov_c_dep): Use $(srcdir).

From-SVN: r66804
2003-05-14 15:29:10 +00:00
Michael Eager 88e80294dd Makefile.in: Initialize program_transform_cross_name from @program_transform_name@ instead...
2003-05-13  Michael Eager <eager@mvista.com>

	* Makefile.in: Initialize program_transform_cross_name from
	@program_transform_name@ instead of target_alias.

From-SVN: r66752
2003-05-13 08:37:00 +02:00
Neil Booth 6cfae22a6b Makefile.in (stage2_build, [...]): Set BUILD_CC to the same as CC.
* Makefile.in (stage2_build, stage3_build, stage4_build)
	: Set BUILD_CC to the same as CC.

From-SVN: r66740
2003-05-12 21:35:47 +00:00
Richard Henderson 66ea6f4cce re PR c/10675 (Compile time increases quadratically with struct size)
PR c/10675
        * c-decl.c: Include hashtab.h.
        (detect_field_duplicates): New.
        (finish_struct): Use it.
        * Makefile.in (c-decl.o): Update.
        * c-parse.in (structsp_attr): Nreverse component_decl_list results.
        (component_decl_list, component_decl_list2,
        components, components_notype): Build list in reverse order.
        (enumlist): Clarify docs.  Use TREE_CHAIN not chainon.
        * tree.c (chainon): Special case op2 null as well.
        Reorg for clarity.

From-SVN: r66710
2003-05-11 20:25:38 -07:00
Kaveh R. Ghazi 04f3680d86 * Makefile.in (out_object_file): Don't set -Wno-error for ${cpu}.o.
From-SVN: r66708
2003-05-12 02:29:38 +00:00
Gabriel Dos Reis 49468c8be1 c-parse.in (if_stmt_locus): New object.
* c-parse.in (if_stmt_locus): New object.
	(if_prefix rule): Use it.  Don't use warning_with_file_and_line.
	(select_or_iter_stmt rule): Likewise.
	(if_stmt_file): Remove.
	(if_stmt_line): Likewise.
	* jump.c: include "diagnostic.h"
	(never_reached_warning): Don't use warning_with_file_and_line.
	* Makefile.in (jump.o): Add dependce on diagnostic.h

From-SVN: r66627
2003-05-09 09:25:34 +00:00
Alan Modra c6b97fac18 expr.c (move_block_from_reg): Remove "size" parm.
* expr.c (move_block_from_reg): Remove "size" parm.  Localize vars.
	Move code handling pieces not larger than a word to..
	* function.c (assign_parms): ..here, but use change_address instead
	of adjust_address and operand_subword, and expand_binop instead of
	expand_shift.  Adjust calls to move_block_from_reg.
	* expr.h (move_block_from_reg): Update declaration.
	(copy_blkmode_from_reg): Formatting.
	* Makefile.in (function.o): Add $(OPTABS_H) to deps.
	* config/alpha/alpha.c (alpha_setup_incoming_varargs): Adjust
	move_block_from_reg calls.
	* config/arc/arc.c (arc_setup_incoming_varargs): Likewise.
	* config/i960/i960.c (i960_setup_incoming_varargs): Likewise.
	* config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise.
	* config/m88k/m88k.c (m88k_builtin_saveregsk): Likewise.
	* config/mips/mips.c (mips_setup_incoming_varargs): Likewise.
	* config/pa/pa.c (hppa_builtin_saveregs): Likewise.
	* config/romp/romp.h (SETUP_INCOMING_VARARGS): Likewise.
	* config/rs6000/rs6000.c (setup_incoming_varargs): Likewise.
	* config/sh/sh.c (sh_builtin_saveregs): Likewise.

From-SVN: r66623
2003-05-09 16:07:25 +09:30
Janis Johnson 6ccfe27ca7 Makefile.in: (site.exp): Add ALT_CC_UNDER_TEST, add quotes around expanded variables.
2003-05-05  Janis Johnson  <janis187@us.ibm.com>

	* Makefile.in: (site.exp): Add ALT_CC_UNDER_TEST, add quotes around
	expanded variables.
	* doc/sourcebuild.texi (C tests): Describe gcc.dg/compat tests.
testsuite:
	* lib/compat.exp (compat-execute): New argument.
	* g++.dg/compat/compat.exp: Pass new argument to compat-execute.
	* gcc.dg/compat: New test directory.
	* gcc.dg/compat/compat.exp: New expect script.
	* gcc.dg/compat/scalar-by-value-1_main.c: New test file.
	* gcc.dg/compat/scalar-by-value-1_x.c: New test file.
	* gcc.dg/compat/scalar-by-value-1_y.c: New test file.
	* gcc.dg/compat/scalar-by-value-2_main.c: New test file.
	* gcc.dg/compat/scalar-by-value-2_x.c: New test file.
	* gcc.dg/compat/scalar-by-value-2_y.c: New test file.

From-SVN: r66506
2003-05-05 21:59:35 +00:00
Zdenek Dvorak 09780dfb65 Makefile.in (LIBGCOV): Add _gcov_merge_add.
* Makefile.in (LIBGCOV): Add _gcov_merge_add.
	* gcov-io.h: Make GCOV_LINKAGE extern in libgcov and prevent resulting
	namespace clash.
	(GCOV_MERGE_FUNCTIONS): New.
	(gcov_merge_fn): Declare.
	(struct gcov_ctr_info): New field "merge".
	(__gcov_merge_add): Declare.
	* coverage.c (ctr_merge_functions): New.
	(build_ctr_info_type, build_ctr_info_value): Initialize merge field
	of gcov_ctr_info type.
	* libgcov.c (__gcov_merge_add): New.
	(gcov_exit): Call a hook to merge values of counters.

From-SVN: r66457
2003-05-04 15:20:26 +00:00
Zack Weinberg 87f85ea066 re PR c/10604 (-Wall includes sign conversion warning [3.3 regression])
PR c/10604

	* c-common.c (warn_sign_compare): Initialize to -1.
	* c-opts.c (c_common_init_options): Don't set warn_sign_compare here.
	(c_common_decode_option <OPT_Wall>): Set warn_sign_compare
	for C++ only.
	(c_common_post_options): Set warn_sign_compare from extra_warnings
	if it's still -1 at this point.

	* toplev.c (maybe_warn_unused_parameter): New static variable.
	(set_Wextra): New static function.
	(W_options): Remove "extra".
	(decode_W_option): Call set_Wextra.
	(independent_decode_option): Likewise.
	(set_Wunused): Cooperate with set_Wextra in setting
	warn_unused_parameter.
	(rest_of_compilation): No need to check extra_warnings as
	well as warn_uninitialized.

	* c-typeck.c (build_binary_op, build_conditional_expr):
	No need to check extra_warnings as well as warn_sign_compare.
	(internal_build_compound_expr): No need to check extra_warnings
	as well as warn_unused_value.
	* function.c (expand_function_end): No need to check extra_warnings
	as well as warn_unused_parameter.
	* stmt.c (expand_expr_stmt_value): No need to check extra_warnings
	as well as warn_unused_value.
	* cp/typeck.c (build_x_compound_expr): No need to check
	extra_warnings as well as warn_unused_value.

	* doc/invoke.texi: Clarify documentation of -Wsign-compare.
	* gcc.dg/compare7.c, g++.dg/warn/compare1.C: New testcases.

	* Makefile.in: Disable -Werror for gengtype-lex.o.

From-SVN: r66436
2003-05-03 21:44:31 +00:00
Matt Kraai 28068c2c91 * Makefile.in (gcov-iov.h): Use move-if-change and a stamp.
From-SVN: r66417
2003-05-03 05:43:34 +00:00
Nathan Sidwell 6060edcbe2 Makefile.in (TREE_H): Replace location.h with input.h.
* Makefile.in (TREE_H): Replace location.h with input.h.
	(GTFILES) Remove location.h
	(gt-lists.h): Replace gt-location.h with gt-input.h
	* input.h (input_filename, input_line): Remove variables.
	(location_s, location_t): Move from location.h.
	(input_location): New.
	(input_filename, input_line): New #defines.
	* location.h: Remove.
	* tree.h: Replace location.h with input.h.
	(input_filename, input_line): Remove.
	* diagnostic.h: Replace location.h with input.h.
	* gcc.h (input_filename, input_filename_length): Remove declarations.
	* toplev.c (input_filename, input_line): Remove.
	(input_location): Define.
	(push_srcloc, pop_srcloc): Adjust.
	* diagnostic.c (diagnostic_report_current_module): Adjust.
f:
	* lex.c (ffelex_file_pop_): Adjust file_stack member use.
	(ffelex_file_push_): Likewise.
	(ffelex_hash_): Likewise.
java:
	* lex.h (input_lineno): Remove declaration.
	* parse-scan.y: #include input.h.
	(input_filename): Remove declaration.
	(input_location): Add definition.
	(input_line): Remove definition.

From-SVN: r66378
2003-05-02 11:33:06 +00:00
Geoffrey Keating b9538b2e88 * Makefile.in (quickstrap): Pass BOOT_CFLAGS to submake.
From-SVN: r66251
2003-04-29 20:34:45 +00:00
Phil Edwards c7a5cf6153 configure.in (make_compare_target): Test for GNU cmp and set this variable appropriately.
2003-04-25  Phil Edwards  <pme@gcc.gnu.org>

	* configure.in (make_compare_target):  Test for GNU cmp and set this
	variable appropriately.
	* Makefile.in (compare, compare3, compare4, compare-lean, compare3-lean,
	compare4-lean): Rename actual targets to slowcompare*.  New compare*
	targets depend on names based on make_compare_target.
	* configure:  Regenerated.

From-SVN: r66075
2003-04-25 21:15:01 +00:00
Neil Booth 6338b35872 Makefile.in (c-lex.o, [...]): Update.
* Makefile.in (c-lex.o, LIBCPP_OBJS, cpplex.o): Update.
	* c-lex.c (MULTIBYTE_CHARS): Remove conditionals.
	(lex_string): Take cpp_string with full spelling.
	(cb_ident): Update.
	(c_lex): Update diagnostics.
	* cpplex.c (SPELL_NUMBER, SPELL_STRING): Combine into SPELL_LITERAL.
	(create_literal): New.
	(lex_string): Unterminated literals have type CPP_OTHER.
	(_cpp_lex_direct): Update calls to lex_string.  Use create_literal
	for CPP_OTHER.
	(cpp_token_len, cpp_spell_token, cpp_output_token): Simplify.
	(_cpp_equiv_tokens, cpp_interpret_charconst): Update.
	* cpplib.c (parse_include, do_line, do_linemarker,
	destringize_and_run): Update for token storing full spelling.
	* cpplib.h: Update token spelling types.
	* cppmacro.c (stringify_arg, check_trad_stringification):
	Update for token storing full spelling.
cp:
	* Make-lang.in (lex.o): Remove mbchar.h.
	* lex.c (MULTIBYTE_CHARS): Lose.
	* parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
	in c-lex.c.
testsuite:
	* gcc.dg/cpp/include2.c: Update.
	* gcc.dg/cpp/multiline-2.c: New.
	* gcc.dg/cpp/multiline.c: Update.
	* gcc.dg/cpp/strify2.c: Update.
	* gcc.dg/cpp/trad/literals-2.c: Update.

From-SVN: r66019
2003-04-23 22:44:06 +00:00
Nathan Sidwell cdb2376773 Makefile.in (LIBGCC_DEPS): Add gcov headers.
* Makefile.in (LIBGCC_DEPS): Add gcov headers.
	(libgcov.a): Depends on LIBGCC_DEPS.
	* basic-block.h (profile_info): Moved here from coverage.h. Made
	a pointer.
	* coverage.c (struct function_list): Fixed array of counter types.
	(struct counts_entry): Keyed by counter type, contains summary.
	(profile_info): Moved to profile.c.
	(prg_ctr_mask, prg_n_ctrs, fn_ctr_mask, fn_n_ctrs): New global
	vars.
	(profiler_label): Remove.
	(ctr_labels): New.
	(set_purpose, label_for_tag, build_counter_section_fields,
	build_counter_section_value, build_counter_section_data_fields,
	build_counter_section_data_values, build_function_info_fields,
	build_function_info_value, gcov_info_fields, gcov_info_value): Remove.
	(build_fn_info_type, build_fn_info_value, build_ctr_info_type,
	build_ctr_info_value, build_gcov_info): New.
	(htab_counts_entry_hash, htab_counts_entry_eq): Adjust.
	(reads_counts_file): Adjust.
	(get_coverage_counts): Takes counter number. Add summary
	parameter. Adjust.
	(coverage_counter_ref): Tkaes counter number. Adjust. Lazily
	create counter array labels.
	(coverage_end_function): Adjust.
	(create_coverage): Adjust.
	(find_counters_section): Remove.
	* coverage.h (MAX_COUNTER_SECTIONS): Remove.
	(struct section_info, struct profile_info): Remove.
	(profile_info): Moved to basic-block.h.
	(coverage_counter_ref): Takes a counter number.
	(get_coverage_counts): Takes a counter number. Added summary
	parameter.
	(find_counters_section): Remove.
	* gcov-dump.c (tag_arc_counts): Rename to ...
	(tag_counters): ... here. Adjust.
	(tag_table): Move tag_counters to 3rd entry. Remove
	PROGRAM_PLACEHOLDER and PROGRAM_INCORRECT entries.
	(dump_file): Check for counter tag values here.
	(tag_summary): Adjust.
	* gcov-io.c (gcov_write_summary, gcov_read_summary): Adjust.
	* gcov-io.h (GCOV_LOCKED): New.
	(GCOV_TAG_ARC_COUNTS): Rename to ...
	(GCOV_TAG_COUNTS_BASE): ... here.
	(GCOV_TAG_PLACEHOLDER_SUMMARY, GCOV_TAG_INCORRECT_SUMMARY):
	Remove.
	(GCOV_COUNTER_ARCS, GCOV_COUNTERS, GCOV_NAMES): New.
	(GCOV_TAG_FOR_COUNTER, GCOV_COUNTER_FOR_TAG,
	GCOV_TAG_IS_COUNTER): New.
	(struct gcov_ctr_summary): New.
	(struct gcov_summary): Adjust.
	(struct gcov_counter_section): Remove.
	struct gcov_counter_section_data): Remove.
	(struct gcov_function_info): Rename to ...
	(struct gcov_fn_info): ... here. Adjust.
	(struct gcov_ctr_info): New.
	(struct gcov_info): Adjust.
	* gcov.c (read_count_file): Adjust.
	(output_lines): Adjust.
	* libgcov.c (gcov_exit): Adjust.
	(__gcov_flush): Adjust.
	* mklibgcc.in (libgcc2_c_dep): Add gcov headers.
	* predict.c (maybe_hot_bb_p, probably_cold_bb_p,
	probably_never_executed_bb_p, compute_frequency_function): Adjust
	profile_info use.
	* profile.c (struct counts_entry): Remove.
	(profile_info): Define here.
	(get_exec_counts): Adjust get_coverage_counts call.
	(compute_branch_probablilities): Remove find_counters_section
	call.
	(gen_edge_profiler): Adjust coverage_counter_ref call.
	* tracer.c (tail_duplicate): Adjust profile_info use.

From-SVN: r65990
2003-04-23 14:05:11 +00:00
Vincent Celier 6d412a7b22 gthr-gnat.h, [...]: new sources for implementation of --enable-threads=gnat.
* gthr-gnat.h, gthr-gnat.c: new sources for implementation of
        --enable-threads=gnat.
        * Makefile.in: Add gthr-gnat.c to LIB2ADDEH.
        * configure.in: Add gnat to the list of thread packages
        * configure: Rebuild.
        * config/t-linux: Add gthr-gnat.c to LIB2ADDEH and LIB2ADDEHDEP

From-SVN: r65961
2003-04-22 17:52:04 -04:00
Mark Mitchell b2dd096b0c Makefile.in (calls.o): Depend on except.h.
* Makefile.in (calls.o): Depend on except.h.
	* calls.c: Include except.h.
	(emit_call_1): Call note_eh_region_may_contain_throw if
	appropriate.
	* except.c (eh_region): Add may_contain_throw.
	(expand_eh_region_end_cleanup): Do not include handler code when
	it cannot be reached.
	(note_eh_region_may_contain_throw): New function.
	* except.h (note_eh_region_may_contain_throw): New function.

	* call.c (build_over_call): Use build_cxx_call.
	(build_cxx_call): New method, split out of build_over_call.
	* cp-tree.h (language_function): Add can_throw.
	(build_cxx_call): Declare it.
	* decl.c (finish_function): If a function does not contain any
	calls to functions that can throw an exception, indicate that
	fact.
	* decl2.c (mark_used): Do not defer the instantiation of
	functions, if the current function does not throw.
	* optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
	* pt.c (instantiate_decl): Make sure import_export_decl is called
	before emitting things.
	* rtti.c (throw_bad_cast): Use build_cxx_call.
	(build_dynamic_cast_1): Likewise.
	* typeck.c (build_function_call): Likewise.

	* g++.dg/template/recurse.C: Adjust location of error messages.

From-SVN: r65929
2003-04-22 05:44:12 +00:00
Nathan Sidwell ca29da4301 Break out coverage routines to new file.
* Makefile.in (COVERAGE_H): New variable
        (C_OBJS): Add coverage.o
        (coverage.o): New target.
        (profile.o, loop-init.o, sched-ebb.o, predict.o, tracer.o): Adjust
        dependencies.
        (GTFILES): Adjust.
        (gt-coverage.h): New target.
        (gt-profile.h): Remove.
        * profile.h: Remove. Move to ...
        * coverage.h: ... here. New. #include gcov-io.h.
        * gcov-io.h: Move function definitions to ...
        * gcov-io.c: ... here. New.
        * profile.c: Move coverage routines to coverage.c.
        (instrument_edges, get_exec_counts, branch_prob, init_branch_prob,
        end_branch_prob): Adjust.
        * coverage.c: New. Coverage routines from profile.c
        (coverage_counter_ref, coverage_init, coverage_finish,
        coverage_end_function, coverage_begin_output,
        coverage_counter_ref, get_coverage_counts): Define.
        * gcov-dump.c, gcov.c: #include gcov-io.c.
        * libgcov.c: Likewise. Adjust.
        * loop-init.c: Don't #include profile.h
        * tracer.c, predict.c, sched-ebb.c: Adjust #includes.
        * rtl.h: Add coverage prototypes.
        * toplev.c (compile_file): Init coverage, not branch_prob.
        Always call coverage_finish.
        (rest_of_compilation): Call coverage_end_function.

From-SVN: r65897
2003-04-21 19:48:10 +00:00
Neil Booth 1613e52bdd Makefile.in (LIBCPP_OBJS): Add cppcharset.o.
* Makefile.in (LIBCPP_OBJS): Add cppcharset.o.
	(cppcharset.o): New target.
	* c-lex.c (is_extended_char): Move to cppcharset.c.
	(utf8_extend_token): Delete.
	* cppcharset.c: New file.
	* cpphash.h (_cpp_valid_ucn): New.
	* cpplex.c (lex_identifier): Update prototype.
	(continues_identifier_p): Rename forms_identifier_p.  Handle UCN
	escapes.
	(maybe_read_ucs): Rename maybe_read_ucn.  Update to use code
	in cppcharset.c.
	(lex_number, lex_identifier, cpp_parse_escape): Update.
	(_cpp_lex_direct): Update to handle UCNs.
	(cpp_avoid_paste): Don't paste to form a UCN.
testsuite:
	* ucs.c: Update diagnostic messages.

From-SVN: r65845
2003-04-20 07:29:23 +00:00
Matt Kraai 30f45f509f Makefile.in: Change $(target-alias) to $(target_alias) in comment.
* Makefile.in: Change $(target-alias) to $(target_alias) in
        comment.

From-SVN: r65822
2003-04-19 18:57:23 +00:00
Roger Sayle 96c6931df4 re PR c/10175 (-Wunreachable-code doesn't work for single lines)
2003-04-16  Roger Sayle  <roger@eyesopen.com>

	* c-semantics.c (find_reachable_label): New function to find a
	potentially reachable label in an expression.
	(expand_unreachable_if_stmt): Similar to expand_if_stmt but
	assumes the start of the IF_STMT is unreachable (dead) code.
	(expand_unreachable_stmt): Similar to expand_stmt but assumes
	the start of the statement list is unreachable (dead) code.
	(genrtl_if_stmt):  If the controlling expression of the IF
	is constant, use expand_unreachable_stmt for the THEN or ELSE
	clause as appropriate.
	(genrtl_switch_stmt):  Use expand_unreachable_stmt to expand
	the body of a SWITCH statement.
	(expand_stmt): The code immediately following a "return",
	"break", "continue" or "goto" is unreachable.
	* Makefile.in (c-semantics.o): Depend upon tree-inline.h.

	* gcc.dg/Wunreachable-5.c: New test case for PR c/10175.
	* gcc.c-torture/execute/medce-1.c: New test case.
	* gcc.c-torture/execute/medce-2.c: New test case.

From-SVN: r65715
2003-04-17 01:22:51 +00:00
Neil Booth 8951a63507 * Makefile.in (c-opts.o): Use custom action.
From-SVN: r65601
2003-04-14 22:25:10 +00:00