1. 05 Jul, 2004 20 commits
    • langhooks.c: Don't include gt-langhooks.h. · 6de66680
      	* langhooks.c: Don't include gt-langhooks.h.
      	(var_labelno): Delete.
      	(lhd_set_decl_assembler_name): Do not append a distinguishing
      	number to file-scope internal-linkage declarations for the first
      	input file, even if they have DECL_CONTEXT set.  Use DECL_UID of
      	the declaration itself (if at block scope), or its containing
      	TRANSLATION_UNIT_DECL (if at file scope) for the distinguishing
      	number.
      
      	* opts.c (cur_in_fname): New global.
      	* opts.h: Declare it.
      	* tree.c: Include opts.h.
      	(make_node_stat): If creating a TRANSLATION_UNIT_DECL, give it
      	DECL_UID equal to cur_in_fname.
      	(copy_node_stat): Do not change DECL_UID when copying a
      	TRANSLATION_UNIT_DECL.
      	(build_common_tree_nodes): Adjust next_decl_uid to reserve the
      	range 0 .. num_in_fnames-1 for TRANSLATION_UNIT_DECLs.
      
      	* c-decl.c (c_static_assembler_name): Delete.
      	* c-tree.h (c_static_assembler_name): Delete prototype.
      	* c-lang.c, objc/objc-lang.c: Don't override
      	LANG_HOOKS_SET_DECL_ASSEMBLER_NAME.
      
      	* Makefile.in (tree.o): Update dependencies.
      	(GTFILES): Remove langhooks.c.
      
      cp:
      	* decl.c (cxx_init_decl_processing): Call
      	build_common_tree_nodes before creating the global NAMESPACE_DECL.
      
      From-SVN: r84123
      Zack Weinberg committed
    • fold-const.c (fold): Optimize unsigned modulus by a power of two into a bit-wise AND, i.e. · ab0e8f66
      
      	* fold-const.c (fold) <TRUNC_MOD_EXPR>: Optimize unsigned modulus
      	by a power of two into a bit-wise AND, i.e. "X % C" as "X & (C-1)".
      	Normalize "X % C" as "X % -C" for signed modulus and negative C.
      	Optimize "X % -Y" as "X % Y" for signed modulus.
      	<EQ_EXPR>: Recursively call "fold" when transforming "(X % Y) == 0"
      	into "((unsigned) X % Y) == 0".
      
      From-SVN: r84122
      Roger Sayle committed
    • tree.h (DECL_SEEN_IN_BIND_EXPR_P): New macro. · 48eb4e53
      	* tree.h (DECL_SEEN_IN_BIND_EXPR_P): New macro.
      	* gimplify.c (gimple_add_tmp_var, gimplify_bind_expr): Use it.
      	(gimplify_target_expr, gimplify_expr): Likewise.
      	(copy_if_shared_r): No longer need special case for BIND_EXPR.
      	(unshare_body, unvisit_body): Only look at nested if BODY_P is
      	whole function.
      	(gimplify_compound_lval): See if we can strip any useless conversion.
      	(gimplify_modify_expr, gimplify_modify_expr_to_memcpy): Take size
      	from RHS, not LHS.
      	(gimplify_modify_expr_to_memset): Likewise.
      	(gimplify_expr, case CONSTRUCTOR): Handle use as statement.
      	* tree-inline.c (setup_one_parameter): Use DECL_SEEN_IN_BIND_EXPR_P.
      	(declare_inline_vars): Likewise.
      	(walk_type_fields): New function.
      	(walk_tree): Use it.
      	* tree-nested.c (create_tmp_var_for): Show seen in BIND_EXPR.
      
      From-SVN: r84121
      Richard Kenner committed
    • tree-sra.c (struct sra_walk_fns): Init function now returns bool. · 402a3dec
      	* tree-sra.c (struct sra_walk_fns): Init function now returns bool.
      	(sra_walk_modify_expr): Allow init function to fail.
      	(scan_init): Now returns bool.
      	(generate_element_init): If can't understand INIT, return false.
      	(scalarize_init): Return false if generate_element_init does.
      
      From-SVN: r84120
      Richard Kenner committed
    • re PR c++/2518 (user-declared operator new hides standard one) · 030bbecd
      	PR c++/2518
      	* call.c (build_operator_new_call): Look only at global scope.
      
      	PR c++/2518
      	* g++.dg/lookup/new1.C: New test.
      
      From-SVN: r84119
      Giovanni Bajo committed
    • tree-pretty-print.c (dump_generic_node, [...]): Properly print bounds. · 2709efd8
      	* tree-pretty-print.c (dump_generic_node, case ARRAY_TYPE): Properly
      	print bounds.
      
      From-SVN: r84118
      Richard Kenner committed
    • expr.c (expand_expr_real_1, [...]): Don't check against bounds if bounds aren't constant. · ebd5a208
      	* expr.c (expand_expr_real_1, case SWITCH_EXPR): Don't check against
      	bounds if bounds aren't constant.
      
      From-SVN: r84117
      Richard Kenner committed
    • Fix typo · 6f70e46e
      From-SVN: r84116
      Richard Kenner committed
    • sourcebuild.texi (Config Fragments): Use @comma{} in cross-reference to section title. · 22e9e201
      	* sourcebuild.texi (Config Fragments): Use @comma{} in
      	cross-reference to section title.
      
      From-SVN: r84115
      Joseph Myers committed
    • * tree-cfg.c (verify_expr): Use CHECK_OK in binary case. · 50b04185
      From-SVN: r84114
      Richard Kenner committed
    • function.c, [...]: Move max_size hook to type hooks; remove bogus PARAMS. · 8963a517
      	* function.c, langhooks-def.h, langhooks.h: Move max_size hook
      	to type hooks; remove bogus PARAMS.
      
      From-SVN: r84113
      Richard Kenner committed
    • 14340.cc: Fix typos in instantiation of set and multiset (functor param given as int). · 879dc459
      2004-07-05  Jonathan Wakely  <redi@gcc.gnu.org>
      
      	* testsuite/23_containers/{set,multiset}/14340.cc: Fix typos in
      	instantiation of set and multiset (functor param given as int).
      
      From-SVN: r84112
      Jonathan Wakely committed
    • re PR c++/11406 (sorry+ICE: `array_ref' not supported by dump_type) · 7c6536fa
      	PR c++/11406
      	* g++.dg/template/sizeof8.C: New test.
      
      From-SVN: r84111
      Volker Reichelt committed
    • c-tree.h (TYPE_ACTUAL_ARG_TYPES): Use TYPE_LANG_SLOT_1. · 95b4aca6
      	* c-tree.h (TYPE_ACTUAL_ARG_TYPES): Use TYPE_LANG_SLOT_1.
      	* dwarf2out.c (add_data_member_location_attribute): Check for
      	TREE_BINFO.
      	* tree.c (tree_node_kinds): Add "binfos".
      	(binfo_lang_slots): New.
      	(make_node_stat): Add TREE_BINFO.
      	(make_tree_binfo_stat): New.
      	(tree_node_structure): Add TREE_BINFO.
      	* tree.def (TREE_BINFO): New.
      	* tree.h (REC_OR_UNION_CHECK): Rename to ...
      	(RECORD_OR_UNION_CHECK): ... here.
      	(NOT_RECORD_OR_UNION_CHECK): New.
      	(TRE_VIA_VIRTUAL): Allow TREE_LIST or TREE_BINFO.
      	(TYPE_FIELDS, TYPE_METHODS, TYPE_VFIELD): Adjust for
      	RECORD_OR_UNION_CHECK.
      	(TYPE_BINFO): Use RECORD_OR_UNION_CHECK.
      	(TYPE_LANG_SLOT_1): New.
      	(BINFO_TYPE, BINFO_OFFSET, BINFO_VTABLE, BINFO_VIRTUALS,
      	BINFO_BASETYPES, TYPE_BINFO_BASETYPES, BINFO_VPTR_FIELD,
      	BINFO_BASEACCESSES, BINFO_INHERITANCE_CHAIN): Adjust.
      	(BINFO_ELTS): Remove.
      	(BINFO_LANG_SLOT): New.
      	(struct tree_binfo): New.
      	(binfo_lang_slots): Declare.
      	(enum tree_node_structure_enum): Add TS_BINFO.
      	(union tree_node): Add binfo.
      	(make_tree_binfo_stat): Declare.
      	(make_tree_binfo): New.
      	(enum tree_node_kind): Add binfo_kind.
      
      	* cp/call.c (enforce_access): Expect TREE_BINFO.
      	* cp/class.c (binfo_ctor_vtable): Check TREE_BINFO.
      	* cp/cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
      	(BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
      	Adjust.
      	(BINFO_LANG_ELTS): Remove.
      	(BINFO_LANG_SLOTS): New.
      	(TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
      	(CLASSTYPE_TEMPLATE_INFO): Adjust.
      	* cp/pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
      	* cp/search.c (lookup_member): Check TREE_BINFO.
      	* cp/semantics.c (perform_or_defer_access_check): Likewise.
      	(check_accessibility_of_qualified_id): Check
      	deferred_access_no_check.
      	* cp/tree.c (make_binfo): Use make_tree_binfo.
      
      	* java/class.c (make_class): Use make_tree_binfo.
      	(set_super_info, add_interface_do): Likewise.
      	* java/java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
      
      	* objc/objc-act.c (start_class, objc_declare_protocols,
      	start_protocols): Use TYPE_LANG_SLOT_1.
      	* objc/objc-act.h (CLASS_BINFO_ELTS, PROTOCOL_BINFO_ELTS): Rename
      	to ...
      	(CLASS_LANG_SLOT_ELTS, PROTOCOL_LANG_SLOT_ELTS): ... here.
      	(CLASS_IVARS, CLASS_RAW_IVARS, CLASS_STATIC_TEMPLATE,
      	CLASS_CATEGORY_LIST, CLASS_PROTOCOL_LIST, CLASS_OWN_IVARS,
      	PROTOCOL_LIST, PROTOCOL_FORWARD_DECL): Use TYPE_LANG_SLOT_1.
      
      From-SVN: r84110
      Nathan Sidwell committed
    • rtl.h (struct rtx_def): Remove the integrated flag. · acf8677f
      	* rtl.h (struct rtx_def): Remove the integrated flag.
      	Use the return_val flag for MEM_SCALAR_P.
      	Reshuffle and update flags in CLEAR_RTX_FLAGS
      
      From-SVN: r84109
      Steven Bosscher committed
    • re PR target/16357 (ICE copying 7 bytes between extern char[]s) · e0ec4c3b
      	PR target/16357
      	* config/mips/mips.c (mips_block_move_straight): Pass BLKmode memrefs
      	to mips_expand_unaligned_load, mips_expand_unaligned_store, and
      	move_by_pieces.
      
      From-SVN: r84108
      Richard Sandiford committed
    • var-tracking.c: Fix some comments. · feb61729
      	* var-tracking.c: Fix some comments.
      	(frame_stack_adjust): New.
      	(vt_stack_adjustments): Init stack_adjust of entry block to
      	minus stack adjustment of function prologue.
      	(adjust_stack_reference): Do not adjust if adjustment == 0.
      	(compute_bb_dataflow): Use plus_constant instead of gen_rtx_PLUS.
      	(emit_notes_in_bb): Likewise.
      	(vt_add_function_parameters): Do not adjust locations of
      	function arguments.
      	(vt_initialize): Compute the stack adjustment of function
      	prologue and offset the initial "location" of frame_base_decl
      	from the stack pointer after prologue.
      
      From-SVN: r84106
      Josef Zlomek committed
    • function.c (struct assign_parm_data_all): New. · 6071dc7f
              * function.c (struct assign_parm_data_all): New.
              (struct assign_parm_data_one): New.
              (assign_parms_initialize_all, assign_parms_augmented_arg_list,
              assign_parm_find_data_types, assign_parms_setup_varargs,
              assign_parm_find_entry_rtl, assign_parm_is_stack_parm,
              assign_parm_find_stack_rtl, assign_parm_adjust_entry_rtl,
              assign_parm_adjust_stack_rtl, assign_parm_setup_block_p,
              assign_parm_setup_block, assign_parm_setup_reg,
              assign_parm_setup_stack, assign_parms_unsplit_complex): Split from ...
              (assign_parms): ... here.
      
      From-SVN: r84105
      Richard Henderson committed
    • re PR libfortran/15472 (implicit open for unformatted file causes run-time error) · bf1df0a0
      2004-07-04  Bud Davis  <bdavis9659@comcast.net>
                  Paul Brook  <paul@codesourcery.com>
      
              PR fortran/15472
              * io/transfer.c(us_write): set recl for seq unform writes to max size.
              * io/transfer.c(data_transfer_init): handle un-opened seq unform unit.
              * io/unix.c(fd_alloc_w_at): handle requests at start, fd_flush at
                right time.
              * io/unix.c(is_seekable): set based upon the file/device, not the
                method being used to access it (fd or mmap).
              * io/unix.c(fd_flush): don't set file_size if !seekable.
              * io/unix.c(fd_truncate: ditto.
              * gfortran.fortran-torture/execute/seq_io.f90: New test.
      
      Co-Authored-By: Paul Brook <paul@codesourcery.com>
      
      From-SVN: r84104
      Bud Davis committed
    • Daily bump. · 91a8b459
      From-SVN: r84102
      GCC Administrator committed
  2. 04 Jul, 2004 20 commits