Jason Merrill [Fri, 9 Oct 1998 00:10:57 +0000 (00:10 +0000)]
pt.c (resolve_overloaded_unification): New fn.
* pt.c (resolve_overloaded_unification): New fn.
(try_one_overload): Likewise.
(unify): Don't fail on unknown type.
(type_unification_real): Likewise. Use resolve_overloaded_unification
to handle an overloaded argument.
(template_args_equal): Split out...
(comp_template_args): From here.
(determine_specialization): Also allow a template with more
parms than were explicitly specified.
* cp-tree.h: Add template_args_equal.
* call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
Marc Lehmann [Thu, 8 Oct 1998 23:26:54 +0000 (17:26 -0600)]
ylwrap: Change absolute path checks to check for DOS style path names.
�
* ylwrap: Change absolute path checks to check for DOS style path
names.
* ylwrap: Don't use a full path name if the source file is in the
same directory. From hjl@lucon.org (H.J. Lu).
Brought over from devo.
Marc Lehmann [Thu, 8 Oct 1998 23:26:53 +0000 (17:26 -0600)]
ylwrap: Change absolute path checks to check for DOS style path names.
�
* ylwrap: Change absolute path checks to check for DOS style path
names.
* ylwrap: Don't use a full path name if the source file is in the
same directory. From hjl@lucon.org (H.J. Lu).
Brought over from devo.
Jeff Law [Thu, 8 Oct 1998 23:04:13 +0000 (17:04 -0600)]
backport: libiberty.h (xexit): Change decl to use modern GCC attribute to indicate exit does not return.
* Merge devo and egcs include directories.
1998-08-03 Jason Molenda (jsm@bugshack.cygnus.com)
* libiberty.h (xexit): Change decl to use modern GCC attribute
to indicate exit does not return.
Jeffrey A Law [Thu, 8 Oct 1998 05:04:57 +0000 (05:04 +0000)]
typeck.c (unsigned_type): Only return TItype nodes when HOST_BITS_PER_WIDE_INT is >= 64 bits.
* typeck.c (unsigned_type): Only return TItype nodes when
HOST_BITS_PER_WIDE_INT is >= 64 bits.
(signed_type): Similarly.
* decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
when HOST_BITS_PER_WIDE_INT is >= 64 bits.
(init_decl_processing): Only create TItype nodes when
HOST_BITS_PER_WIDE_INT is >= 64 bits.
* cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
when HOST_BITS_PER_WIDE_INT is >= 64 bits.
Jeffrey A Law [Thu, 8 Oct 1998 05:01:10 +0000 (05:01 +0000)]
typeck (type_for_mode): Only return TItype nodes when HOST_BITS_PER_WIDE_INT is >= 64 bits.
* typeck (type_for_mode): Only return TItype nodes when
HOST_BITS_PER_WIDE_INT is >= 64 bits.
(type_for_size): Similarly.
* decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
when HOST_BITS_PER_WIDE_INT is >= 64 bits.
(init_decl_processing): Only create TItype nodes when
HOST_BITS_PER_WIDE_INT is >= 64 bits.
Jeff Law [Thu, 8 Oct 1998 04:57:39 +0000 (22:57 -0600)]
c-common.c (type_for_mode): Only return TItype nodes when HOST_BITS_PER_WIDE_INT is >= 64 bits.
* c-common.c (type_for_mode): Only return TItype nodes when
HOST_BITS_PER_WIDE_INT is >= 64 bits.
* c-decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
when HOST_BITS_PER_WIDE_INT is >= 64 bits.
(init_decl_processing): Only create TItype nodes when
HOST_BITS_PER_WIDE_INT is >= 64 bits.
* c-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
when HOST_BITS_PER_WIDE_INT is >= 64 bits.
Forgot to commit with last change.
Jeff Law [Thu, 8 Oct 1998 04:37:30 +0000 (22:37 -0600)]
c-common.c (type_for_mode): Only return TItype nodes when HOST_BITS_PER_WIDE_INT is >= 64 bits.
* c-common.c (type_for_mode): Only return TItype nodes when
HOST_BITS_PER_WIDE_INT is >= 64 bits.
* c-decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
when HOST_BITS_PER_WIDE_INT is >= 64 bits.
(init_decl_processing): Only create TItype nodes when
HOST_BITS_PER_WIDE_INT is >= 64 bits.
* c-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
when HOST_BITS_PER_WIDE_INT is >= 64 bits.
Bernd Schmidt [Thu, 8 Oct 1998 04:07:40 +0000 (22:07 -0600)]
stmt.c (n_occurrences): New static function.
* stmt.c (n_occurrences): New static function.
(expand_asm_operands): Verify that all constrains match in the
number of alternatives.
Verify that '+' or '=' are at the beginning of an output constraint.
Don't allow '&' for input operands.
Verify that '%' isn't written for the last operand.
* reload.c (find_reloads): Abort if an asm is found with invalid
constraints; all possible problems ought to be checked for earlier.
flow.c (find_basic_blocks): Calc upper bound for extra nops in max_uids_for_flow.
* flow.c (find_basic_blocks): Calc upper bound for extra nops in
max_uids_for_flow.
(find_basic_blocks_1): Add a nop to the end of a basic block when
a trailing call insn does not have abnormal control flow.
* gcse.c (pre_transpout): New variable.
(alloc_pre_mem, free_pre_mem, dump_pre_data): Bookkeeping for it.
(compute_pre_transpout): Calculate it.
(compute_pre_ppinout): Use it to eliminate impossible placements
due to abnormal control flow through calls.
(compute_pre_data): Call compute_pre_transpout.
Ken Raeburn [Wed, 7 Oct 1998 18:23:51 +0000 (18:23 +0000)]
mips.md (tablejump_internal3, [...]): Tack on a `use' of the table label, so flow analysis will recognize a tablejump.
* config/mips/mips.md (tablejump_internal3, tablejump_internal4 and matching
define_insns): Tack on a `use' of the table label, so flow analysis will
recognize a tablejump.
Bernd Schmidt [Wed, 7 Oct 1998 09:50:05 +0000 (03:50 -0600)]
jump.c (duplicate_loop_exit_test): Strip REG_WAS_0 notes off all insns we're going to copy.
* jump.c (duplicate_loop_exit_test): Strip REG_WAS_0 notes off all
insns we're going to copy.
* regclass.c (reg_scan_mark_refs): Don't test X for NULL_RTX.
David S. Miller [Wed, 7 Oct 1998 02:17:57 +0000 (02:17 +0000)]
sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Rework for efficiency by checking whether we need to modify the current stack...
* config/sparc/sol2-sld-64.h (TRANSFER_FROM_TRAMPOLINE): Rework
for efficiency by checking whether we need to modify the current
stack permission at all.
(ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Define.
* config/sparc/sparc.c (sparc_initialize_trampoline): Emit
__enable_execute_stack libcall here too if
TRANSFER_FROM_TRAMPOLINE is defined.
* config/sparc/sparc.h: Set TARGET_ARCH32 to a constant if
IN_LIBGCC2.
Mark Mitchell [Wed, 7 Oct 1998 02:08:55 +0000 (02:08 +0000)]
cp-tree.h (vtbl_ptr_type_node): New variable.
* cp-tree.h (vtbl_ptr_type_node): New variable.
* class.c (build_vtbl_ref): Don't indirect through the vptr; it's
already of the right type.
(finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
Simplify code to grow vtable.
* decl.c (vtbl_ptr_type_node): Define.
(init_decl_processing): Initialize it.
* caller-save.c (restore_referenced_regs): Lose mode argument.
(insert_save): Lose mode argument.
(insert_restore): Lose mode argument.
(insert_one_insn): Lose mode argument.
(save_call_clobbered_regs): Lose mode argument.
(setup_save_areas): Take no argument and return void. All callers
changed.
Don't verify validity of memory addresses.
* reload.h (setup_save_ares): Adjust prototype.
(save_call_clobbered_regs): Likewise.
* reload1.c (delete_caller_save_insns): New function.
(caller_save_spill_class): Delete variable.
(caller_save_group_size): Delete variable.
(reload): Call setup_save_areas and save_call_clobbered_regs
in the main loop, before calling calculate_needs_all_insns.
Don't call save_call_clobbered_regs after the loop.
Call delete_caller_save_insns at the end of an iteration if
something changed.
Delete code to manage caller_save_spill_class.
Emit the final note before setting reload_first_uid.
Simplify test that determines whether reload_as_needed gets run.
(calculate_needs): Delete code to manage caller_save_spill_class.
Bernd Schmidt [Tue, 6 Oct 1998 20:38:40 +0000 (14:38 -0600)]
loop.c (count_one_set): New static function, broken out of count_loop_regs_set
* loop.c (count_one_set): New static function, broken out of
count_loop_regs_set
(count_loop_regs_set): Call it.
* global.c (mark_reg_store): Handle clobbers here by not calling
set_preference.
(mark_reg_clobber): Just call mark_reg_store after ensuring SETTER
is in fact a clobber.
* integrate.c (process_reg_param): New function, broken out of
expand_inline_function.
(expand_inline_function): Call it.
Mark Mitchell [Tue, 6 Oct 1998 14:20:30 +0000 (14:20 +0000)]
cp-tree.def (PTRMEM_CST): New tree node.
* cp-tree.def (PTRMEM_CST): New tree node.
* cp-tree.h (ptrmem_cst): New type.
(lang_type): Remove local_typedecls.
(dummy): Increase to 12 bits from 11.
(CLASSTYPE_LOCAL_TYPEDECLS): Remove.
(PTRMEM_CST_CLASS): New macro.
(PTRMEM_CST_MEMBER): Likewise.
(current_access_specifier): New variable.
(current_class_type): Remove duplicate declaration.
(finish_struct): Change prototype.
(unreverse_member_declarations): New function.
(pushdecl_class_level): Change prototype.
(grok_enum_decls): Remove.
(fixup_anonymous_union): New function.
(grok_x_components): Change prototype.
(tsubst_chain): Remove.
(finish_member_template_decl): Likewise.
(check_explicit_specialization): Fix indentation.
(finish_class_definition): Change prototype.
(finish_member_class_template): Likewise.
(finish_member_declaration): New function.
(check_multiple_declarators): Likewise.
* class.c (class_stack_node_t): New type.
(current_class_base): Remove.
(current_class_stack): Change type.
(current_access_specifier): New variable.
(grow_method): Remove.
(check_member_decl_is_same_in_complete_scope): Break out from
finish_struct.
(make_method_vec): New function.
(free_method_vec): Likewise.
(add_implicitly_declared_members): Break out from finish_struct_1.
(free_method_vecs): New variable.
(add_method): Rework for direct use from parser.
(handle_using_decl): Watch for NULL_TREE while iterating through
CLASSTYPE_METHOD_VEC.
(finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
just do some error-checking.
(warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
(finish_struct_1): Simplify. Use add_implicitly_declared_members.
(finish_struct): Change prototype. Simplify; fields and methods
are already set up at this point.
(init_class_processing): Set up current_class_stack.
(pushclass): Save current_access_specifier.
(popclass): Restore it.
(currently_open_class): Simplify.
(build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
* decl.c (saved_scope): Add access_specifier.
(maybe_push_to_top_level): Save it.
(pop_from_top_level): Restore it.
(maybe_process_template_type_declaration): Use
finish_member_declaration.
(pushtag): Likewise.
(pushdecl_class_level): Don't return a value.
(fixup_anonymous_union): Break out from grok_x_components.
(shadow_tag): Use it.
(xref_tag): Complain about using an elaborated type specifier to
reference a template type parameter or typedef name.
(xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
(current_local_enum): Remove.
(build_enumerator): Call finish_member_declaration.
(grok_enum_decls): Remove.
* decl2.c (grok_x_components): Simplify.
(check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
(grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
(merge_functions): Add to comment.
(arg_assoc_type): Prototype.
(arg_assoc): Pass as many arguments as there are parameters.
* error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
OFFSET_REF.
* expr.c (cpls_expand_expr): Remove dead code. Handle
PTRMEM_CST.
* friend.c (do_friend): Lookup friends when in nested classes.
Change comments.
* init.c (build_offset_ref): Do lookup even for classes that are
only partially defined.
(decl_constant_value): Remove dead code.
* method.c (build_overload_value): Remove hack where by TYPE was
not a TYPE. Handle PTRMEM_CST.
(build_template_parm_names): Don't pass a PARM_DECL where a TYPE
should go.
* parse.y (components, notype_components, component_decl,
component_decl_1, component_declarator, component_declarator0):
Now all are itype rather than ttype. Rework to add members to
classes on the fly.
(typesqpecqual_reserved): Use check_multiple_declarators.
(structsp): Update class to finish_class_definition.
(do_xref_defn): Unsplit into named_class_head.
(access_specifier): Set current_access_specifier.
* pt.c (set_current_access_from_decl): New function.
(finish_member_template_decl): Don't take the parameters.
(comp_template_args): Make more robust.
(lookup_template_class): Don't use current_local_enum.
(for_each_template_parm): Handle PTRMEM_CST.
(instantiate_class_template): Use set_current_access_from_decl,
finish_member_declaration and unreverse_member_declarations. Set
lineno/input_filename before generating implicit member functions.
(type_unification_real): Don't assume back-unification happens
only for the last argument.
(regenerate_decl_from_template): Call pushclass a bit earlier.
(tsubst_chain): Remove.
(tsubst_enum): Use set_current_access_from_decl.
(set_mangled_name_for_template_decl): Fix indentation.
* search.c (lookup_fnfields_1): Change iteration through
CLASSTYPE_METHOD_VEC.
(dfs_pushdecls): Likewise.
(dfs_compress_decls): Likewise.
(add_conversions): Likewise.
* semantics.c (finish_class_definition): Don't take components.
Change call to finish_struct.
(finish_member_declaration): New function.
(finish_member_class_template): Don't take template parameters.
Change call to grok_x_components. Call finish_member_template_decl.
(check_multiple_declarators): New function.
* sig.c (append_signature_fields): Work from the TYPE_METHODS, not
a passed in fieldlist.
* tree.c (search_tree): Handle PTRMEM_CST.
(mapcar): Likewise.
* typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
INTEGER_CSTs, for pointer-to-data members.
Bernd Schmidt [Tue, 6 Oct 1998 00:39:23 +0000 (18:39 -0600)]
Makefile.in (stupid.o): Update dependencies.
* Makefile.in (stupid.o): Update dependencies.
(global.o): Likewise.
* global.c: Include reload.h
(reg_becomes_live): New function.
(reg_dies): New function.
(build_insn_chain): New function.
(global_alloc): Call build_insn_chain before calling reload.
* reload.h (struct needs): New structure definition.
(struct insn_chain): Likewise.
(reload_insn_chain): Declare variable.
(new_insn_chain): Declare function.
* reload1.c (reload_startobj): New variable.
(reload_insn_chain): New variable.
(unused_insn_chains): New variable.
(new_insn_chain): New function.
(init_reload): Initialize reload_startobj, not reload_firstobj.
(reload): Initialize reload_firstobj.
Before returning, free everything on the reload_obstack.
* stupid.c: Include insn-config.h, reload.h and basic-block.h.
(reg_where_dead_chain, reg_where_born_exact, reg_where_born_clobber,
current_chain): New variables.
(reg_where_born): Delete variable.
(REG_WHERE_BORN): New macro.
(find_clobbered_regs): New function.
(stupid_life_analysis): Don't allocate/free reg_where_born.
Allocate and free reg_where_born_exact, reg_where_born_clobber,
reg_where_dead_chain.
Use REG_WHERE_BORN instead of reg_where_born.
While processing the insns, build the reload_insn_chain with
information about register lifetimes.
(stupid_reg_compare): Use REG_WHERE_BORN instead of reg_where_born.
(stupid_mark_refs): Replace arg INSN with arg CHAIN. All callers
changed.
Compute and information about birth and death of pseudo registers in
reg_where_dead_chain, reg_where_born_exact and reg_where_born_clobber.
Delete code to set elements of reg_where_born.
Jason Merrill [Mon, 5 Oct 1998 22:10:23 +0000 (18:10 -0400)]
pt.c (instantiate_decl): Do save and restore file position.
* pt.c (instantiate_decl): Do save and restore file position.
* method.c (build_decl_overload_real): Clear
numeric_output_need_bar after __.
* call.c (build_new_method_call): Issue 'incomplete type' error,
if class is not defined.
Kaveh Ghazi [Mon, 5 Oct 1998 21:31:14 +0000 (21:31 +0000)]
call.c (build_object_call): Move declaration of variable `fn' into the scope where it is used.
* call.c (build_object_call): Move declaration of variable
`fn' into the scope where it is used. Don't access variable
`fn' when it is uninitialized, instead use `fns'.
Kaveh Ghazi [Mon, 5 Oct 1998 21:13:46 +0000 (21:13 +0000)]
call.c (build_object_call): Move declaration of variable `fn' into the scope where it is used.
* call.c (build_object_call): Move declaration of variable
`fn' into the scope where it is used. Don't access variable
`fn' when it is uninitialized, instead use `fns'.
Kaveh R. Ghazi [Mon, 5 Oct 1998 11:27:05 +0000 (11:27 +0000)]
warn_summary (subdirectoryFilter): New shell function to optionally filter in/out gcc subdirectories when...
* warn_summary (subdirectoryFilter): New shell function to
optionally filter in/out gcc subdirectories when summarizing
warnings. Add new flags to support subdirectory filtering.
Also, ensure the bootstrap stage is a number. Add some more C
keywords that are preserved in the "warning type" summary and
tighten up the "arg ???" regexp.