2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2024-12-31 02:44:37 +08:00
Commit Graph

25242 Commits

Author SHA1 Message Date
Richard Kenner
59adecfa8c fold-const.c (extract_muldiv, [...]): Reverse operation if C is negative.
* fold-const.c (extract_muldiv, case {MIN,MAX}_EXPR): Reverse
	operation if C is negative.
	(extract_muldiv, case SAVE_EXPR): Supresss if arg has side effects.
	(extract_muldiv, case {PLUS,MINUS}_EXPR): Don't apply distributive
	law for some divisions if constant is negative and change other
	divisions to the opposite rounding.

From-SVN: r30714
1999-11-29 17:56:39 -05:00
Richard Kenner
ce64861eed expr.c (store_constructor_field): If bit position is not multiple of alignment of TARGET's mode, use BLKmode.
* expr.c (store_constructor_field): If bit position is not multiple
	of alignment of TARGET's mode, use BLKmode.

From-SVN: r30713
1999-11-29 17:44:52 -05:00
Richard Kenner
a2b9916174 expr.c (expand_expr_unaligned): Add more code from full case that is needed when OP0 is in a register.
* expr.c (expand_expr_unaligned): Add more code from full case
	that is needed when OP0 is in a register.

From-SVN: r30712
1999-11-29 17:35:51 -05:00
Bruce Korb
b3bd782076 Update e-address
From-SVN: r30711
1999-11-29 22:31:15 +00:00
Alexandre Petit-Bianco
97f3028449 parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE in case of error.
Tue Nov 23 10:55:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
 	in case of error. Error message tuned.

This fixes a catch clause error handling reported on the java-discuss
mailing list:

  http://sourceware.cygnus.com/ml/java-discuss/1999-q4/msg00358.html

From-SVN: r30710
1999-11-29 12:43:24 -08:00
Per Bothner
9b811d11de exception.cc: Remove prototype declarations for malloc and free.
1999-11-27  Per Bothner  <per@bothner.com>

	* exception.cc:  Remove prototype declarations for malloc and free.
	These clash with recent versions of glibc, which specifies `throws ()'
	when __cplusplus is defined.  Instead, #include <stdlib.h>.

From-SVN: r30709
1999-11-29 19:43:55 +00:00
J"orn Rennecke
d0f89bfce0 Fix for gcc.c-torture/noncompile/920824-1.c on SH (and mips?)
Fix for gcc.c-torture/noncompile/920824-1.c on SH (and mips?)
	* dwarfout.c (field_byte_offset): Size can be zero if there was
	an error.

From-SVN: r30708
1999-11-29 18:11:35 +00:00
Alexandre Petit-Bianco
37feda7d76 hu Nov 4 16:27:01 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
        (qualify_ambiguous_name): Likewise.

(This patch fixes the gcj PR #55.)

From-SVN: r30707
1999-11-29 09:40:31 -08:00
Bernd Schmidt
b901ec947a Delete unused vars.
From-SVN: r30706
1999-11-29 17:35:07 +00:00
Bernd Schmidt
7762d54ea8 Add missing return types
From-SVN: r30705
1999-11-29 14:48:30 +00:00
Bruce Korb
c5984b7b9e don't skip GLIBC files any more, more C++ header testing, corrected spelling of mach
From-SVN: r30704
1999-11-29 14:35:50 +00:00
Bernd Schmidt
97c1c80b37 New test: gcc.dg/991129-1.c
From-SVN: r30703
1999-11-29 12:18:56 +00:00
Bernd Schmidt
96b42f4c8c Verify class is ok when allocating reload reg in push_reload
From-SVN: r30702
1999-11-29 12:09:54 +00:00
Bernd Schmidt
ca1a4af124 Fix bug in reloads_conflict
From-SVN: r30701
1999-11-29 11:51:16 +00:00
Bernd Schmidt
e1306f499c Clean up parts of the scheduler
From-SVN: r30700
1999-11-29 11:44:57 +00:00
Bernd Schmidt
d94d6abfeb Delete useless patterns
From-SVN: r30699
1999-11-29 11:06:51 +00:00
Bernd Schmidt
311fe27c71 Fix abort in loop_iterations
From-SVN: r30698
1999-11-29 10:51:09 +00:00
Mark Mitchell
83c23b6c72 Make ChangeLog entry clearer
From-SVN: r30697
1999-11-29 09:05:34 +00:00
Jeff Law
64f4f0826d Daily bump.
From-SVN: r30696
1999-11-29 01:45:07 -07:00
David S. Miller
8843045335 sparc.c (init_cumulative_args): Fix type of third arg.
1999-11-29  David S. Miller  <davem@redhat.com>

	* config/sparc/sparc.c (init_cumulative_args): Fix type of third
	arg.
	* config/sparc/sparc-protos.h: Update proto, move into RTX_CODE.

From-SVN: r30695
1999-11-29 00:07:23 -08:00
Jeff Law
46984a9abc Fix a typo.
From-SVN: r30694
1999-11-28 23:18:49 -07:00
Kaveh R. Ghazi
b0791fa925 com.c (ffecom_file_, [...]): Constify a char*.
* com.c (ffecom_file_, ffecom_file, file_buf,
        ffecom_open_include_): Constify a char*.
        (ffecom_possible_partial_overlap_): Mark parameter `expr2' with
        ATTRIBUTE_UNUSED.
        (ffecom_init_0): Use a fully prototyped cast in call to bsearch.
        (lang_print_error_function): ANSI-fy.

        * com.h (ffecom_file): Constify a char*.

        * fini.c (main): Call return, not exit.

        * g77spec.c (lang_specific_driver): Use non-const *in_argv in
        assignment.

        * intrin.c (ffeintrin_cmp_name_): Don't needlessly cast away
        const-ness.

From-SVN: r30693
1999-11-29 02:50:04 +00:00
Kaveh R. Ghazi
14657de8f1 com.c (ffecom_get_invented_identifier): Rewrite to take an ellipses.
* com.c (ffecom_get_invented_identifier): Rewrite to take an ellipses.

	(ffecom_char_enhance_arg_, ffecom_do_entry_,
	ffecom_f2c_make_type_, ffecom_gen_sfuncdef_,
	ffecom_start_progunit_, ffecom_start_progunit_,
	ffecom_start_progunit_, ffecom_sym_transform_assign_,
	ffecom_transform_equiv_, ffecom_transform_namelist_,
	ffecom_vardesc_, ffecom_vardesc_array_, ffecom_vardesc_dims_,
	ffecom_end_transition, ffecom_lookup_label, ffecom_temp_label):
	Adjust accordingly.

	* com.h (ffecom_get_invented_identifier): Likewise.

	* sts.c (ffests_printf): New function taking ellipses.
	(ffests_printf_1D, ffests_printf_1U, ffests_printf_1s,
	ffests_printf_2Us): Delete.

	* sts.h: Likewise.

	* std.c (ffestd_R1001dump_, ffestd_R1001dump_1005_1_,
	ffestd_R1001dump_1005_2_, ffestd_R1001dump_1005_3_,
	ffestd_R1001dump_1005_4_, ffestd_R1001dump_1005_5_,
	ffestd_R1001dump_1010_2_, ffestd_R1001dump_1010_3_,
	ffestd_R1001dump_1010_4_, ffestd_R1001dump_1010_5_,
	ffestd_R1001rtexpr_): Call `ffests_printf', not `ffests_printf_*'.

	* ste.c (ffeste_io_ialist_, ffeste_io_cilist_, ffeste_io_cllist_,
	ffeste_io_icilist_, ffeste_io_inlist_, ffeste_io_olist_): Likewise.

From-SVN: r30692
1999-11-29 02:26:49 +00:00
Kaveh R. Ghazi
146e60a070 libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined.
* libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined.
        (asprintf, vasprintf): Provide declarations.

From-SVN: r30691
1999-11-29 02:08:36 +00:00
Robert Lipe
9fdbc878c2 sco5.h (FINI_SECTION_ASM_OP_COFF): Move destructor fn table from .fini into .dtor.
* i386/sco5.h (FINI_SECTION_ASM_OP_COFF): Move destructor fn
        table from .fini into .dtor.

From-SVN: r30690
1999-11-28 21:44:43 +00:00
Anthony Green
140592a013 tree.h (struct tree_decl): Add malloc_flag.
* tree.h (struct tree_decl): Add malloc_flag.
	(DECL_IS_MALLOC): Define.
	* c-common.c (attrs): Add A_MALLOC attribute.
	(init_attributes): Add this attribute to the table.
	(decl_attributes): Handle malloc attribute.
	* calls.c (special_function_p): Check for the malloc attribute.
	* extend.texi (Function Attributes): Document malloc attribute.

From-SVN: r30689
1999-11-28 20:45:34 +00:00
Jeffrey A Law
8b4b9b7ad3 * pa.md (reload shift-add patterns): Remove.
From-SVN: r30688
1999-11-28 13:24:48 -07:00
Herman A.J. ten Brugge
2e02044af4 * reorg.c (dbr_schedule) Print more statistics. Corrected
problem when printing info when 3 delay slots are filled.

From-SVN: r30687
1999-11-28 13:05:50 -07:00
Jeff Law
866aed9e46 Daily bump.
From-SVN: r30686
1999-11-28 01:45:07 -07:00
Jakub Jelinek
c285f57a29 combine.c (setup_incoming_promotions): Pass an outgoing regno to FUNCTION_ARG_REGNO_P which it expects.
* combine.c (setup_incoming_promotions): Pass an outgoing
        regno to FUNCTION_ARG_REGNO_P which it expects.

From-SVN: r30685
1999-11-28 01:08:02 -07:00
Andreas Jaeger
3fad8d4ad6 * mips/linux.h (CPP_PREDEFINES): Undefine before redefining.
From-SVN: r30684
1999-11-28 01:03:00 -07:00
Philippe De Muyter
6de9b8ff12 * hashtab.c (sys/types.h): File included.
From-SVN: r30683
1999-11-28 00:58:37 -07:00
Philippe De Muyter
e976142538 * cccp.c (do_include): Avoid initialization of automatic variable.
From-SVN: r30682
1999-11-28 00:56:53 -07:00
Philippe De Muyter
915b80ede3 integrate.c (mark_stores): Function definition made void, to match previous declaration.
* integrate.c (mark_stores): Function definition made void, to match
        previous declaration.
        * regclass.c (dump_regclass): Ditto.
        * Makefile.in (WARN_CFLAGS): Macro augmented by `-Wtraditional'.

From-SVN: r30681
1999-11-28 00:47:57 -07:00
William Bader
5c96cc3ba4 * gcc_update: Allow patches compressed by bzip2.
From-SVN: r30680
1999-11-28 00:41:09 -07:00
Mark Mitchell
1c1c0761d8 Fix typo
From-SVN: r30679
1999-11-27 18:04:50 +00:00
Mark Mitchell
21b0c6dc7c decl2.c (finish_file): Call expand_body for inline functions that will be written out but that do not...
* decl2.c (finish_file): Call expand_body for inline functions
	that will be written out but that do not yet have RTL.
	* semantics.c (expand_body): Do not generate RTL For inline
	functions that do not yet need to be written out.

From-SVN: r30678
1999-11-27 18:01:48 +00:00
Richard Kenner
9f887d05bb expr.c (store_constructor): Use EXACT_DIV_EXPR when dividend is known to be multiple of divisor.
* expr.c (store_constructor): Use EXACT_DIV_EXPR when dividend is
	known to be multiple of divisor.

From-SVN: r30677
1999-11-27 09:55:36 -05:00
Richard Kenner
dd1db5ec31 * expr.c (store_constructor): Don't clobber TARGET if CLEARED.
From-SVN: r30676
1999-11-27 09:47:23 -05:00
Bernd Schmidt
ac51c4e37c New test: compile/991127-1.c
From-SVN: r30675
1999-11-27 14:08:36 +00:00
Richard Kenner
667c1c2c84 combine.c (try_combine): Add code to try to merge a set of a two-word pseudo to a constant with a...
* combine.c (try_combine): Add code to try to merge a set of a
	two-word pseudo to a constant with a setting of one of those words
	to a constant.

From-SVN: r30674
1999-11-27 08:59:20 -05:00
Richard Kenner
1baa375fea fold-const.c (negate_expr, [...]): New.
* fold-const.c (negate_expr, associate_trees, extract_muldiv): New.
	(split_tree): Completely rework to make more general.
	(make_range, fold): Call negate_expr.
	(fold, case NEGATE_EXPR): Simplify -(a-b) is -ffast-math.
	(fold, associate): Call new split_tree and associate_trees.
	(fold, case MULT_EXPR, case *_{DIV,MOD}_EXPR): Call extract_muldiv.

From-SVN: r30673
1999-11-27 08:50:13 -05:00
Jeff Law
a8b64d6cf4 Daily bump.
From-SVN: r30672
1999-11-27 01:45:07 -07:00
Bernd Schmidt
d42971c45e Avoid GNU C extension
From-SVN: r30671
1999-11-26 11:44:37 +00:00
Jeff Law
4254c06cca Daily bump.
From-SVN: r30670
1999-11-26 01:45:06 -07:00
Mark Mitchell
46e8c075d0 Make-lang.in (CXX_SRCS): Add optimize.c.
1999-11-25  Mark Mitchell  <mark@codesourcery.com>

	* Make-lang.in (CXX_SRCS): Add optimize.c.
	* Makefile.in (CXX_OBJS): Add optimize.o.
	(CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
	(spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
	(class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
	(search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
	(xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
	(dump.o): Likewise.
	(optimize.o): New target.
	* class.c: Don't include splay-tree.h.
	* cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
	* cp-tree.h: Include splay-tree.h.
	(DECL_UNINLINABLE): New macro.
	(CTOR_BEGIN_P, CTOR_END_P): New macros.
	(flag_inline_trees): New variable.
	(local_variable_p): New function.
	(nonstatic_local_decl_p): Likewise.
	(optimize_function): Likewise.
	(cplus_unsave_expr_now): Remove.
	(copy_tree_r): Declare.
	(remap_save_expr): Likewise.
	* decl.c (local_variable_p): Don't
	make it static.
	(local_variable_p_walkfn): New function.
	(make_rtl_for_local_static): Remove code to try to avoid writing
	out static constants.
	(emit_local_var): Fix indentation.
	(nonstatic_local_decl_p): New function.
	(check_default_argument): Use local_variable_p_walkfn, not
	local_variable_p, when walking the tree.
	(start_function): Set the DECL_CONTEXT for automatically generated
	labels.
	(finish_constructor_body): Use CTOR_STMT to mark the end of a
	constructor.
	* decl2.c: Don't include splay-tree.h.
	(flag_inline_trees): Define.
	* dump.c: Don't include
	splay-tree.h.
	* except.c (expand_end_catch_block): Fix comment formatting.
	(expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
	(expand_throw): Tidy comment.
	* init.c (build_vec_delete_1): Use create_temporary_var.
	* lex.c (cplus_tree_code_type): Make it static.
	(cplus_tree_code_length): Likewise.
	(cplus_tree_code_name): Likewise.
	* optimize.c: New file.
	* semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
	with computed gotos.
	(setup_vtbl_ptr): Mark the beginnings of constructors with
	CTOR_STMT.
	(expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
	(expand_body): Call optimize_function.  Save bodies if we're doing
	inlining on trees.
	* tree.c: Don't include splay-tree.h.  Include insn-config.h and
	integrate.h.
	(copy_tree_r): Make it public.
	(statement_code_p): New function.
	(mark_local_for_remap_r): Likewise.
	(cp_usave_r): Likewise.
	(cp_unsave): Likewise.
	(build_cplus_new): Set DECL_CONTEXT for temporary variables.
	(walk_tree): Walk into `s' class nodes.  Walk statement chains.
	(copy_tree_r): Handle 's' class nodes.  Restore chains for
	statements.  Nullify scopes.  Don't copy types.
	(init_tree): Set lang_unsave to cp_unsave.
	(remap_save_expr): Define.
	* ir.texi: Document CTOR_STMT.

From-SVN: r30669
1999-11-25 20:32:04 +00:00
Mark Mitchell
82d26ad03d /gcc/../texinfo/makeinfo/Makefile ] ...
/gcc/../texinfo/makeinfo/Makefile ] ; then echo /home/mitchell/dev/egcs/objdir/gcc/../texinfo/makeinfo/makeinfo ; else echo makeinfo ; fi`" "MAKEINFOFLAGS=" "RANLIB_FOR_TARGET=` if [ -f /home/mitchell/dev/egcs/objdir/gcc/../binutils/ranlib ] ; then echo /home/mitchell/dev/egcs/objdir/gcc/../binutils/ranlib ; else if [ "i686-pc-linux-gnu" = "i686-pc-linux-gnu" ] ; then echo ranlib; else t='s,^,i686-pc-linux-gnu-,'; echo ranlib | sed -e $t ; fi; fi`" "RANLIB_TEST_FOR_TARGET=[ -f ` if [ -f /home/mitchell/dev/egcs/objdir/gcc/../binutils/ranlib ] ; then echo /home/mitchell/dev/egcs/objdir/gcc/../binutils/ranlib ; else if [ "i686-pc-linux-gnu" = "i686-pc-linux-gnu" ] ; then echo ranlib; else t='s,^,i686-pc-linux-gnu-,'; echo ranlib | sed -e $t ; fi; fi` ] || ( [ "i686-pc-linux-gnu" = "i686-pc-linux-gnu" ] && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )" "SHELL=/bin/sh" "STAGE_PREFIX=" "exeext=" "build_exeext=" "objext=.o" "exec_prefix=/usr/local" "prefix=/usr/local" "local_prefix=/usr/local" "gxx_include_dir=/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.96/../../../..`echo /usr/local | sed -e 's|^/usr/local||' -e 's|/[^/]*|/..|g'`/include/g++-3" "tooldir=" "gcc_tooldir=/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.96/../../../../i686-pc-linux-gnu" "bindir=/usr/local/bin" "libsubdir=/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.96" "datadir=/usr/local/share" "distdir=../tmp/\$(subdir)" "localedir=/usr/local/share/locale" "CC=gcc" "CXX_FOR_BUILD=" "CXXFLAGS=" "CXX_FOR_TARGET=" ../cc1plus
make[1]: Entering directory `/home/mitchell/dev/egcs/objdir/gcc/cp'
gcc  -DIN_GCC    -g -W -Wall  -W -Wall  -o ../cc1plus `cat ../stamp-objlist` ../c-common.o ../c-pragma.o call.o decl.o errfn.o expr.o pt.o typeck2.o class.o decl2.o error.o lex.o parse.o ptree.o rtti.o spew.o typeck.o cvt.o except.o friend.o init.o method.o search.o semantics.o tree.o xref.o repo.o dump.o optimize.o   ../../libiberty/libiberty.a
make[1]: Leaving directory `/home/mitchell/dev/egcs/objdir/gcc/cp'
bash$ cd ~/dev/egcs/gcc
bash$ cvs update ChangeLog
P ChangeLog
bash$ cd cp
	* except.c (init_eh_for_function): But still zero
	eh_return_context, eh_return_stack_adjust, and eh_return_handler.

From-SVN: r30668
1999-11-25 20:06:25 +00:00
Mark Mitchell
76fc91c7c8 except.h (eh_status): Adjust documentation for x_protect_list.
* except.h (eh_status): Adjust documentation for x_protect_list.
	(begin_protect_partials): New function.
	* except.c (enqueue_eh_entry): Fix formatting.
	(get_first_handler): Add consistency check.
	(add_partial_entry): Adjust usage of protect_list.
	(emit_cleanup_handler): Save and restore ehqueue.
	(expand_start_all_catch): Add comment.
	(begin_protect_partials): New function.
	(end_protect_partials): Adjust usage of protect_list.
	(init_eh_for_function): Use xcalloc.

From-SVN: r30667
1999-11-25 19:21:27 +00:00
Kaveh R. Ghazi
913d08334a c-common.c (check_format_info): Don't call a variadic function with a non-literal format string.
* c-common.c (check_format_info): Don't call a variadic function
	with a non-literal format string.

	* c-decl.c (grokdeclarator, start_struct, finish_struct): Likewise.

	* c-typeck.c (build_component_ref, build_unary_op, lvalue_or_else,
	pedantic_lvalue_warning, error_init, pedwarn_init, warning_init):
	Likewise.

	* cccp.c (check_macro_name, do_xifdef, vwarning_with_line):
	Likewise.

	* collect2.c (collect_wait): Likewise.

	* dbxout.c (dbxout_type): Likewise.

	* gcc.c (do_spec_1): Likewise.

	* genemit.c (gen_insn, gen_expand): Likewise.

	* genrecog.c (write_switch, write_subroutine): Likewise.

	* mips-tfile.c (catch_signal, botch): Likewise.

	* print-rtl.c (print_rtx): Likewise.

	* toplev.c (default_print_error_function, report_error_function,
	_fatal_insn): Likewise.

From-SVN: r30666
1999-11-25 16:58:32 +00:00
Mark Mitchell
7a12ace5bc * tree.c (unsave_expr_now): Handle NULL_TREE as input.
From-SVN: r30665
1999-11-25 16:14:00 +00:00