Commit Graph

65575 Commits

Author SHA1 Message Date
Daniel Berlin
0fc6c49280 re PR tree-optimization/19624 (PRE pessimizes ivopts)
2005-01-30  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/19624

	* Makefile.in (tree-ssa-pre.o): Add CFGLOOP_H.
	* tree-ssa-pre.c: Add cfgloop.h.
	Update comment.
	(pre_stats): New member, constified.
	(inserted_exprs): New static variable.
	(NECESSARY): New macro.
	(create_expression_by_pieces): Fold the expression, and
	mark it as defaulting to not necessary. Also put in
	inserted_exprs.
	(fully_constant_expression): New function.
	(insert_into_preds_of_block): Modify to not insert phis when we
	are playing with induction variables.
	Push phis onto the inserted_exprs vector, and mark them as not
	necessary by default.
	(insert_aux): Call fully_constant_expression on eprime.
	If all edges produce the same value, mark it constant.
	(mark_operand_necessary): New function.
	(remove_dead_inserted_code): New function.
	(init_pre): Init loop optimizer to get loop info.
	(fini_pre): Free loop_optimizer, and inserted_exprs vec.
	(execute_pre): Commit edge inserts, then remove dead code.

From-SVN: r94448
2005-01-30 19:08:37 +00:00
Richard Henderson
61e067ccd8 * options.c (gfc_init_options): Zero flag_errno_math.
From-SVN: r94447
2005-01-30 10:34:03 -08:00
Richard Henderson
237f420bfe rtl.c (rtx_equal_p): No early exit for CONST_VECTOR.
* rtl.c (rtx_equal_p): No early exit for CONST_VECTOR.
        * varasm.c (const_rtx_hash_1): Handle CONST_VECTOR.

From-SVN: r94446
2005-01-30 10:27:23 -08:00
Richard Henderson
ebd5631751 PR 19700 testcase.
From-SVN: r94443
2005-01-30 09:55:12 -08:00
Richard Henderson
b99d6d2b80 re PR target/19700 (ICE in final_scan_insn with O1 -g -march=athlon-xp -mfpmath=sse)
PR target/19700
        * config/i386/i386.c (ix86_expand_copysign): New.
        (ix86_split_copysign_const): New.
        (ix86_split_copysign_var): Rename from ix86_split_copysign,
        rearrange op1/nmask operands.
        * config/i386/i386-protos.h: Update.
        * config/i386/i386.md (copysignsf3): Use ix86_expand_copysign.
        (copysigndf3): Likewise.
        (copysignsf3_const, copysigndf3_const): New.
        (copysignsf3_var): Rename from copysignsf3, split out splitter
        and fix split predicate for X constraint.
        (copysigndf3_var): Similarly.

From-SVN: r94442
2005-01-30 09:48:01 -08:00
Kazu Hirata
c5c367ac3d optabs.c, [...]: Update copyright.
* optabs.c, doc/c-tree.texi, doc/install.texi, doc/md.texi,
	doc/passes.texi, doc/rtl.texi, doc/sourcebuild.texi,
	doc/tm.texi, doc/tree-ssa.texi: Update copyright.

From-SVN: r94441
2005-01-30 15:36:13 +00:00
Paolo Carlini
d2f64e95fd re PR libstdc++/19642 (streaming doubles is very slow compared to sprintf)
2005-01-30  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/19642
	* config/locale/generic/c_locale.h (__convert_from_v): Switch only
	LC_NUMERIC, and only when actually != "C".

From-SVN: r94440
2005-01-30 14:09:58 +00:00
Bud Davis
23e044cc1d re PR libfortran/19647 (inquire(delim=) returns garbage)
2005-01-30  Bud Davis  <bdavis@gfortran.org>

        PR fortran/19647
        * io/inquire.c (inquire_via_unit): Use correct variable for
        pad.

        * gfortan.dg/inquire_7.f90

From-SVN: r94439
2005-01-30 13:16:19 +00:00
Richard Henderson
d6eabd43ee re PR target/19690 (ICE with -O3 -march=athlon-xp -mfpmath=sse -mno-80387)
PR target/19690
        * config/i386/i386.md (movdf_nointeger, movdf_integer): Fix ordering
        of # and * in constraints.

From-SVN: r94433
2005-01-29 19:14:44 -08:00
Richard Henderson
8d74033081 re PR middle-end/19689 (ICE in store_bit_field, at expmed.c)
PR middle-end/19689
        * expr.c (store_field): Don't strip sub-mode cast when the input
        data is even smaller.

From-SVN: r94429
2005-01-29 18:33:27 -08:00
Richard Henderson
486e432615 re PR middle-end/19687 (ICE with union initializer)
PR middle-end/19687
        * expr.c (categorize_ctor_elements_1): Check for CONSTRUCTOR of a
        union being empty.

From-SVN: r94421
2005-01-29 18:13:46 -08:00
Richard Henderson
eb2ab51138 combine.c (make_field_assignment): Fix argument order to gen_int_mode.
* combine.c (make_field_assignment): Fix argument order
        to gen_int_mode.

From-SVN: r94420
2005-01-29 16:27:01 -08:00
GCC Administrator
c2542a824e Daily bump.
From-SVN: r94417
2005-01-30 00:16:18 +00:00
Richard Guenther
020d90eeaf re PR tree-optimization/15791 (fold misses that two ADDR_EXPR of an arrary obvious not equal)
2005-01-29  Richard Guenther <richard.guenther@uni-tuebingen.de>

	PR tree-optimization/15791
	* fold-const.c (extract_array_ref): New function.
	(fold): Fold comparisons between &a[i] and &a[j] or
	semantically equivalent trees.

	* gcc.dg/tree-ssa/pr15791-1.c: New testcase.
	* gcc.dg/tree-ssa/pr15791-2.c: Likewise.
	* gcc.dg/tree-ssa/pr15791-3.c: Likewise.
	* gcc.dg/tree-ssa/pr15791-4.c: Likewise.
	* gcc.dg/tree-ssa/pr15791-5.c: Likewise.
	* g++.dg/tree-ssa/pr15791-1.C: Likewise.
	* g++.dg/tree-ssa/pr15791-2.C: Likewise.
	* g++.dg/tree-ssa/pr15791-3.C: Likewise.
	* g++.dg/tree-ssa/pr15791-4.C: Likewise.
	* g++.dg/tree-ssa/pr15791-5.C: Likewise.

From-SVN: r94414
2005-01-29 19:25:17 +00:00
Jeff Law
b6e47ceb09 gcse.c (insert_expr_in_table): Revamp handling of available and anticipatable occurrence lists to avoid...
* gcse.c (insert_expr_in_table): Revamp handling of available
        and anticipatable occurrence lists to avoid unnecessary list
        walking.
        (insert_set_in_table): Similarly.

From-SVN: r94413
2005-01-29 11:55:10 -07:00
Paul Brook
985aff9c17 re PR fortran/18565 (gfortran: CONJG: false error message about standard violation)
2005-01-29  Paul Brook  <paul@codesourcery.com>

	PR fortran/18565
	* check.c (real_or_complex_check): New function.
	(gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
	* intrinsic.c (add_functions): Use new check functions.
	* intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
	Add prototypes.
testsuite/
	* gfortran.dg/double_complex_1.f90: New test.

From-SVN: r94412
2005-01-29 17:46:34 +00:00
Joseph Myers
46df282378 c-common.c (fix_string_type): Just use c_build_qualified_type to build string type.
* c-common.c (fix_string_type): Just use c_build_qualified_type to
	build string type.
	(c_build_qualified_type): Build qualified array types with
	TYPE_MAIN_VARIANT pointing to corresponding unqualified type.
	* c-decl.c (c_make_fname_decl): Build unqualified array type
	before qualified type.
	(grokdeclarator): Use TYPE_MAIN_VARIANT of typedef type if element
	type is qualified, not just if type itself is.  Don't apply
	qualifiers to array type when declarator is processed.  Apply
	qualifiers to field type whether or not it is an array type.
	Don't handle array types specially for applying qualifiers to
	variables.
	* c-typeck.c (composite_type): Build unqualified element type and
	array type when forming composite of array types.
	(common_pointer_type, comptypes, comp_target_types,
	type_lists_compatible_p, build_indirect_ref, build_array_ref,
	convert_for_assignment): Don't apply TYPE_MAIN_VARIANT to array
	types.
	(type_lists_compatible_p): Cache TREE_VALUE (args1) and TREE_VALUE
	(args2) in variables a1 and a2.

testsuite:
	* gcc.dg/Wwrite-strings-1.c, gcc.dg/array-quals-2.c,
	gcc.dg/lvalue-3.c: New tests.
	* gcc.dg/concat.c: Update expected messages.

From-SVN: r94411
2005-01-29 16:12:45 +00:00
Thomas Koenig
24a09741e4 re PR libfortran/19595 ([4.0 only] eor does not work)
2005-01-29  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/19595
	* io/transfer.c (data_transfer_init): eor requires advance="NO".
testsuite/
	* gfortran.dg/eor_1.f90:  New test.

From-SVN: r94410
2005-01-29 15:45:17 +00:00
Steven G. Kargl
f240b8960c re PR fortran/19589 (Regression: Error on Data assignment with LOGICAL*1)
2005-01-29  Steven G. Kargl  <kargls@comcast.net>

	PR fortran/19589
	* expr.c (gfc_check_assign):  Check for conformance of logical operands
testsuite/
	* gfortran.dg/logical_data_1.f90: New test.

From-SVN: r94409
2005-01-29 15:35:50 +00:00
Kazu Hirata
567426d9af lang-specs.h, [...]: Update copyright.
* lang-specs.h, objc-act.c, objc-act.h, objc-lang.c: Update
	copyright.

From-SVN: r94408
2005-01-29 12:16:36 +00:00
Kazu Hirata
26af0046ff cse.c (n_elements_made, [...]): Remove.
* cse.c (n_elements_made, max_elements_made): Remove.
	(insert): Don't touch n_elements_made.
	(cse_main): Don't touch n_elements_made or max_elements_made.

From-SVN: r94407
2005-01-29 12:08:04 +00:00
Hans-Peter Nilsson
40d64b5a95 configure.in (noconfigdirs): Match like cris-*-*.
* configure.in (noconfigdirs) <crisv32-*-*>: Match like cris-*-*.
	<crisv32-*-*, cris-*-*>: Only disable target-newlib and
	target-libgloss when not *-*-elf and *-*-aout.
	* configure: Regenerate.

From-SVN: r94404
2005-01-29 04:22:08 +00:00
Mark Mitchell
6ca2d67f22 re PR c++/19253 (bad error message / ICE for invalid template parameter)
PR c++/19253
	* parser.c (cp_parser_diagnose_invalid_type_name): Commit to
	tentative parses.

	PR c++/19253
	* g++.dg/template/crash33.C: New test.

From-SVN: r94403
2005-01-29 02:07:18 +00:00
Mark Mitchell
ee921ddf21 re PR c++/19667 (ICE on (very trivial) invalid)
PR c++/19667
	* g++.dg/template/crash32.C: New test.

	PR c++/19667
	* pt.c (redeclare_class_template): Robustify.

From-SVN: r94402
2005-01-29 00:47:57 +00:00
Jeroen Frijters
8f43f502de re PR libgcj/19649 (java.util.Date.getTimezoneOffset returns negated output)
2004-01-28  Jeroen Frijters  <jeroen@frijters.net>

	PR libgcj/19649
	* java/util/Date.java
	(Date(int,int,int), Date(int,int,int,int,int)): Delegate to other
	constructor.
	(Date(int,int,int,int,int,int)): Fixed to handle out-of-range
	arguments.
	(getTimezoneOffset): Inverted sign.

From-SVN: r94401
2005-01-29 00:43:50 +00:00
GCC Administrator
73095ebc07 Daily bump.
From-SVN: r94399
2005-01-29 00:16:44 +00:00
Stephane Carrez
3a951664df re PR target/15384 (Lines witout effect in t-m68hc11-gas file)
PR target/15384
	* config/m68hc11/t-m68hc11-gas (dp-bit.c): Fix typo causing a
	configuration part of dp-bit.c to be lost.

From-SVN: r94390
2005-01-28 23:08:16 +01:00
Paolo Carlini
7536f1ed9d type_traits (is_function): Minor consistency tweaks.
2005-01-28  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/type_traits (is_function): Minor consistency tweaks.

From-SVN: r94385
2005-01-28 21:00:19 +00:00
Geoffrey Keating
7d665006a3 libstdc++.exp (libstdc++_init): Search the path for the compiler.
* testsuite/lib/libstdc++.exp (libstdc++_init): Search the path
	for the compiler.  Don't set cxxflags.
	(v3_target_compile): Search for libv3test.a relative to $objdir.
	(lsearch_all_inline): New.
	(lsearch_all_inline_not): New.
	(v3-list-tests): Rewrite to not need generated files.
	* testsuite/Makefile.am (IGNORE_WCHAR_T): New.
	(IGNORE_THREAD): New.
	(TESTS_TO_IGNORE): New.
	(site.exp): Set tests_to_ignore, cxxflags.
	* aclocal.m4: Regenerate.
	* Makefile.in: Regenerate.
	* libmath/Makefile.in: Likewise.
	* libsupc++/Makefile.in: Likewise.
	* po/Makefile.in: Likewise.
	* src/Makefile.in: Likewise.
	* testsuite/Makefile.in: Likewise.

From-SVN: r94384
2005-01-28 18:57:59 +00:00
Roger Sayle
82dfb9a58f expmed.c (expand_mult_highpart_optab): When attempting to use a non-widening multiplication in a wider mode...
* expmed.c (expand_mult_highpart_optab): When attempting to use
	a non-widening multiplication in a wider mode, the operands need
	to be converted (zero or sign extended) to that mode.

From-SVN: r94383
2005-01-28 17:49:47 +00:00
Ian Lance Taylor
6aea8136e2 re PR middle-end/16558 (bogus missing-return warning)
PR middle-end/16558
	* g++.dg/warn/Wreturn-type-2.C: New test.

From-SVN: r94382
2005-01-28 17:33:54 +00:00
Ian Lance Taylor
09f8cf2de9 re PR middle-end/16558 (bogus missing-return warning)
PR middle-end/16558
	PR middle-end/19583
	* gimple-low.c (block_may_fallthru): TRY_FINALLY_EXPR only falls
	through if both operands fall through.

From-SVN: r94381
2005-01-28 17:32:57 +00:00
Paolo Carlini
91e390fe3d type_traits: Implement is_empty.
2005-01-28  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/type_traits: Implement is_empty.
	* testsuite/tr1/4_metaprogramming/type_properties/is_empty/
	is_empty.cc: New.
	* testsuite/tr1/4_metaprogramming/type_properties/is_empty/
	typedefs.cc: Likewise.

	* include/tr1/type_traits (__is_abstract_helper): Simplify a bit.

From-SVN: r94379
2005-01-28 17:20:43 +00:00
Kazu Hirata
01aa1d43e4 * cse.c (fold_rtx) <PC>: Don't optimize.
From-SVN: r94378
2005-01-28 17:12:08 +00:00
Jeff Law
bd16270bd8 * gcc.dg/tree-ssa/20050128-1.c: New test.
From-SVN: r94377
2005-01-28 09:50:58 -07:00
Jeff Law
139c978a44 fold-const.c (fold, [...]): Optimize 0 % X.
* fold-const.c (fold, case CEIL_MOD_EXPR): Optimize 0 % X.
        (case FLOOR_MOD_EXPR, ROUND_MOD_EXPR, TRUNC_MOD_EXPR): Similarly.

From-SVN: r94376
2005-01-28 09:35:46 -07:00
Kazu Hirata
1590d0d426 cse.c (cse_reg_info_free_list, [...]): Remove.
* cse.c (cse_reg_info_free_list, cse_reg_info_used_list,
	cse_reg_info_used_list_end): Remove.
	(cse_reg_info_list, cse_reg_info_list_free): New.
	(get_cse_reg_info): When allocating an instance of
	cse_reg_info, add it to the beginning of the cse_reg_info_list
	list.  Remove code to maintain cse_reg_info_used_list.
	(new_basic_block): Reset the free list to the beginning of
	cse_reg_info_list.

From-SVN: r94375
2005-01-28 15:45:11 +00:00
Steven Bosscher
f6c2ac32c2 Fix date on my entry from this morning.
From-SVN: r94374
2005-01-28 15:23:48 +00:00
Richard Sandiford
aefa3edcd4 Rmove bogus line from last entry.
From-SVN: r94372
2005-01-28 14:00:12 +00:00
Richard Sandiford
a738d8481d frv.c (bdesc_2arg): Remove __MDPACKH.
* config/frv/frv.c (bdesc_2arg): Remove __MDPACKH.
	(frv_init_builtins): Change its prototype to take 4 uhalf arguments.
	(frv_expand_mdpackh_builtin): New function.
	(frv_expand_builtin): Use it to expand __MDPACKH.
	* config/frv/media.h (__MDPACKH): Update prototype.
	* doc/extend.texi (__MDPACKH): Update documentation.

From-SVN: r94371
2005-01-28 13:57:29 +00:00
Paolo Carlini
f8023b7846 type_traits: Implement is_abstract, by exploiting the resolution of DR core/337.
2005-01-28  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/type_traits: Implement is_abstract, by exploiting the
	resolution of DR core/337.
	* testsuite/testsuite_tr1.h: Add AbstractClass.
	* testsuite/tr1/4_metaprogramming/type_properties/is_abstract/
	is_abstract.cc: New.
	* testsuite/tr1/4_metaprogramming/type_properties/is_abstract/
	typedefs.cc: Likewise.

	* include/tr1/type_traits (is_function): Rewrite, use the conversion
	F& -> F* instead, thus avoiding problems with abstract classes.
	* testsuite/tr1/4_metaprogramming/primary_type_categories/
	is_function/is_function.cc: Add a test for tricky AbstractClass.

From-SVN: r94370
2005-01-28 13:29:41 +00:00
Uros Bizjak
2aa3d033a1 i386.c (ix86_expand_fp_absneg_operator): Use SSE_FLOAT_MODE_P for use_sse computation.
* config/i386/i386.c (ix86_expand_fp_absneg_operator): Use
	SSE_FLOAT_MODE_P for use_sse computation.

From-SVN: r94365
2005-01-28 10:16:50 +01:00
Steven Bosscher
a29a2d844b * gcc.dg/tree-ssa/20030711-2.c: Run at -O2, not -O1.
From-SVN: r94364
2005-01-28 08:26:24 +00:00
Ralf Corsepius
7d7f3b9502 re PR target/19663 (LINK_GCC_C_SEQUENCE_SPEC doesn't play nice with RTEMS)
2005-01-28  Ralf Corsepius  <ralf.corsepius@rtems.org>

	PR target/19663
	* config/sparc/rtemself.h (LINK_GCC_C_SEQUENCE_SPEC): undefine.

From-SVN: r94363
2005-01-28 07:16:14 +01:00
Matt Austern
86a43457bf objc-act.c (objc_finish_file): In ObjC++ mode, set at_eof before calling instantiate_pending_templates.
* objc-act.c (objc_finish_file): In ObjC++ mode, set at_eof before
        calling instantiate_pending_templates.

From-SVN: r94362
2005-01-28 05:54:55 +00:00
Richard Henderson
046625fab2 builtins.c (expand_builtin_copysign): New.
* builtins.c (expand_builtin_copysign): New.
        (expand_builtin): Call it.
        * genopinit.c (optabs): Add copysign_optab.
        * optabs.c (init_optabs): Initialize it.
        (expand_copysign): New.
        * optabs.h (OTI_copysign, copysign_optab): New.
        (expand_copysign): Declare.

        * config/alpha/alpha.md (UNSPEC_COPYSIGN): New.
        (copysignsf3, ncopysignsf3, copysigndf3, ncopysigndf3): New.

        * config/i386/i386.c (ix86_build_signbit_mask): Split from ...
        (ix86_expand_fp_absneg_operator): ... here.
        (ix86_split_copysign): New.
        * config/i386/i386-protos.h: Update.
        * config/i386/i386.md (UNSPEC_COPYSIGN): New.
        (copysignsf3, copysigndf3): New.

        * config/ia64/ia64.md (UNSPEC_COPYSIGN): New.
        (copysignsf3, ncopysignsf3): New.
        (copysigndf3, ncopysigndf3): New.
        (copysignxf3, ncopysignxf3): New.
        * config/ia64/ia64.c (rtx_needs_barrier): Handle UNSPEC_COPYSIGN.

From-SVN: r94357
2005-01-27 16:55:07 -08:00
Richard Henderson
17a7d6d75a * gcc.dg/uninit-I.c: Fix typos in dg-options and dg-warning directives.
From-SVN: r94356
2005-01-27 16:42:46 -08:00
GCC Administrator
378d4011e6 Daily bump.
From-SVN: r94354
2005-01-28 00:16:26 +00:00
Arend Bayer
6c6678595b cse.c: (find_best_addr): Don't call copy_rtx before calling fold_rtx.
* cse.c: (find_best_addr): Don't call copy_rtx before calling
	fold_rtx.  Save cost recomputation if fold_rtx did nothing.
	(fold_rtx) <ASM_OPERANDS>: Don't do anything if INSN is
	NULL_RTX.

Co-Authored-By: Kazu Hirata <kazu@cs.umass.edu>

From-SVN: r94345
2005-01-27 23:00:19 +00:00
Jeff Law
88af764e45 tree-into-ssa.c (ssa_rewrite_initialize_block): Do not register definitions of SSA_NAMEs which are not being rewritten.
* tree-into-ssa.c (ssa_rewrite_initialize_block): Do not register
        definitions of SSA_NAMEs which are not being rewritten.
        (rewrite_ssa_into_ssa): Only initialize the current definition
        of an SSA_NAME if that SSA_NAME has been marked for rewriting.
        If checking is enabled, assert that SSA_NAME_AUX is clear for all
        SSA_NAMEs before returning.

From-SVN: r94343
2005-01-27 15:33:14 -07:00