* read-rtl.c (struct macro_traverse_data): Define.
(map_attr_string): New static function, broken out of
apply_macro_to_string.
(mode_attr_index, apply_mode_maps): New static functions.
(apply_macro_to_string): Call map_attr_string.
(apply_macro_to_rtx): Add mode_maps and infile parameters. Change
all callers.
(apply_macro_traverse): Expect data to point to a struct
macro_traverse_data.
(read_rtx): Add mode_maps local variable. Use mode_traverse_data
to pass data through htab_traverse.
(read_rtx_1): Add mode_maps parameter. Change all callers.
Handle mode names which are attribute strings.
* doc/md.texi (Substitutions): Rename from String Substitutions.
Change references. Document using attributes as modes.
From-SVN: r99548
gcc/fortran/
PR fortran/20178
* gfortran.h (gfc_option): Add flag_f2c.
* invoke.texi: Document '-ff2c' command line option. Adapt
documentation for '-fno-second-underscore' and '-fno-underscoring'.
* lang.opt (ff2c): New entry.
* options.c (gfc-init_options): Set default calling convention
to -fno-f2c. Mark -fsecond-underscore unset.
(gfc_post_options): Set -fsecond-underscore if not explicitly set
by user.
(handle_options): Set gfc_option.flag_f2c according to requested
calling convention.
* trans-decl.c (gfc_get_extern_function_decl): Use special f2c
intrinsics where necessary.
(gfc_trans_deferred_vars): Change todo error to assertion.
* trans-expr.c (gfc_conv_variable): Dereference access
to hidden result argument.
(gfc_conv_function_call): Add hidden result argument to argument
list if f2c calling conventions requested. Slightly restructure
tests. Convert result of default REAL function to requested type
if f2c calling conventions are used. Dereference COMPLEX result
if f2c cc are used.
* trans-types.c (gfc_sym_type): Return double for default REAL
function if f2c cc are used.
(gfc_return_by_reference): Slightly restructure logic. Return
COMPLEX by reference depending on calling conventions.
(gfc_get_function_type): Correctly make hidden result argument a
pass-by-reference argument for COMPLEX. Remove old code which does
this for derived types.
libgfortran/
PR fortran/20178
* Makefile.am (gfor_specific_src): Add 'intrinsics/f2c_intrinsics.F90'
to dependencies.
* Makefile.in: Regenerate.
* intrinsics/f2c_specific.F90: New file.
gcc/testsuite/
PR fortran/20178
* gfortran.dg/f2c_1.f90, gfortran.dg/f2c_2.f90,
gfortran.dg/f2c_3.f90: New tests.
From-SVN: r99544
2005-05-10 Adrian Straetling <straetling@de.ibm.com>
* config/s390/s390.c: (s390_const_double_ok_for_constraint_p): New
function.
(legitimate_reload_constant_p): Add check for const double zero.
* config/s390/s390.md: Add comment for constraint letter 'G'.
("*movdf_64", "*movdf_31", "movsf"): Add constraint and proper
attributes for new case.
* config/s390/s390.h: (CONST_DOUBLE_OK_FOR_CONSTRAINT_P): Define it as
s390_const_double_ok_for_constraint_p.
* config/s390/s390-protos.h (s390_const_double_ok_for_constraint_p):
Add prototype.
From-SVN: r99541
* tree-ssa-loop-im.c: Include hashtab.h.
(struct mem_ref_loc): New.
(struct mem_ref): Describe the set of references with the same
shape.
(max_stmt_uid, get_stmt_uid, record_mem_ref, free_mem_refs,
maybe_queue_var, fem_single_reachable_address,
for_each_memref, single_reachable_address,
is_call_clobbered_ref, determine_lsm_reg): Removed.
(record_mem_ref_loc, free_mem_ref_locs, determine_lsm_ref,
hoist_memory_reference, memref_hash, memref_eq, memref_del,
gather_mem_refs_stmt, gather_mem_refs, find_more_ref_vops):
New functions.
(rewrite_mem_refs, schedule_sm): Use mem_ref_loc list.
(determine_lsm_loop): Rewritten.
(determine_lsm): Do not set stmt uids.
From-SVN: r99539
* tree-ssa-dom.c (dom_opt_finalize_block): Do not call
thread_across_edge for any abnormal edges.
* gcc.c-torture/compile/20050510-1.c: New test.
From-SVN: r99536
* libgcov.c (create_file_directory): New function. Create
directory for the given file name.
(gcov_max_filename): New static var. Keeps size of the longest
file name.
(gcov_exit): Always try to create directory for output
file. Relocate each filename basing on environment vars.
(__gcov_init): Remember the longest file name.
* tsystem.h: include filenames.h to get IS_DIR_SEPARATOR
* doc/gcov.texi (Cross-profiling): New node documenting
cross-profiling management.
* doc/invoke.texi (-fprofile-arcs): Add xref to cross-profiling.
From-SVN: r99523
* tree-data-ref.c (analyze_array_indexes, analyze_array,
init_data_ref, access_functions_are_affine_or_constant_p,
free_data_refs): Use VEC instead of VARRAY.
* tree-data-ref.h (data_reference): Change the type of
access_fns to VEC(tree,gc)*.
(DR_ACCESS_FN, DR_NUM_DIMENSIONS): Use VEC instead of VARRAY.
From-SVN: r99517
gcc/java:
2005-05-10 Paolo Bonzini <bonzini@gnu.org>
PR java/21436
* class.c (maybe_layout_super_class): Look for imports in this_class.
* parse.h (ctxp_for_generation_last): New.
(do_resolve_class): Add a parameter.
* parse.y (ctxp_for_generation_last): New.
(java_pop_parser_context): Add at end of list.
(find_in_imports, find_in_imports_on_demand): Look in ctxp
if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
the given type are NULL.
(do_resolve_class): Look into the imports of the new second parameter.
Adjust recursive calls.
(resolve_class, resolve_inner_class, find_as_inner_class): Adjust
calls to do_resolve_class.
(create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
(java_complete_class): Do not do that here.
libjava:
2005-05-10 Paolo Bonzini <bonzini@gnu.org>
PR java/21436
* testsuite/libjava.jacks/jacks.xfail: Adjust.
From-SVN: r99513
PR c/21342
* c-decl.c (pushdecl): When there is a declaration in the current
scope and the declarations are external linkage, check for
compatibility with the type in the external scope and update the
type in the external scope with the composite type information.
Do not form a composite type of the new type and the visible type
if they are incompatible.
testsuite:
* gcc.dg/redecl-11.c, gcc.dg/redecl-12.c, gcc.dg/redecl-13.c,
gcc.dg/redecl-14.c, gcc.dg/redecl-15.c: New tests.
From-SVN: r99510
PR libfortran/20788
Missing entry from previous commit:
* io/unix.c (fd_to_stream): Add an avoid_mmap argument indicating
we don't we to mmap this stream. Use fd_open instead of mmap_open
in that case.
(open_external): Call fd_to_stream with avoid_mmap = 0.
(input_stream): Call fd_to_stream with avoid_mmap = 1.
(output_stream): Likewise.
(error_stream): Likewise.
Really committing:
* io/read.c (read_f): Accept 'e', 'E', 'd' and 'D' as first
non-blank characters of a real number.
From-SVN: r99508
* config/sparc/sparc.c (fp_sethi_p): Test !SPARC_SIMM13_P and
remove redundant test.
(fp_mov_p): Accept 0.
(fp_high_losum_p): Remove redundant test.
* config/sparc/predicates.md (const_high_operand): Explicitly test
(not small_int_operand).
(fp_const_high_losum_operand): New.
* config/sparc/sparc.md (movsi_insn): Do not emit 'clr'. Reorder.
(movdi_insn_sp32_v9): Use canonical predicates.
(movdi_insn_sp32): Test !TARGET_V9 instead of !TARGET_ARCH64.
(movdi_insn_sp64_novis): Delete.
(movdi_insn_sp64_vis): Rename into movdi_insn_sp64.
(movsf_insn_novis): Delete.
(movsf_insn_vis): Rename into movsf_insn.
(movsf_no_f_insn): Rename into movsf_insn_no_fpu.
(movsf_lo_sum): Use fp_const_high_losum_operand.
(movsf_high): Likewise.
(movsf_high_losum splitter): Likewise.
(mov<V32:mode> expander): Use register_or_zero_operand.
(mov<V64:mode> expander): Likewise.
(movdf_insn_sp32): Use register_or_zero_operand.
(movdf_no_e_insn_sp32): Use register_or_zero_operand.
Rename into movdf_insn_sp32_no_fpu.
(movdf_no_e_insn_v9_sp32): Use register_or_zero_operand.
Rename into movdf_insn_sp32_v9_no_fpu.
(movdf_insn_v9only_novis): Delete.
(movdf_insn_v9only_vis): Rename into movdf_insn_sp32_v9.
(movdf_insn_sp64_novis): Delete.
(movdf_insn_sp64_vis): Rename into movdf_insn_sp64.
(movdf_no_e_insn_sp64): Use register_or_zero_operand.
Rename into movdf_insn_sp64_no_fpu.
(movtf expander): Use register_or_zero_operand.
(movtf_insn_sp32): Delete.
(movtf_insn_vis_sp32): Use register_or_zero_operand.
Rename into movtf_insn_sp32.
(movtf_no_e_insn_sp32): Use register_or_zero_operand.
Rename into movtf_insn_sp32_no_fpu.
(movtf_insn_hq_sp64): Delete.
(movtf_insn_hq_vis_sp64): Use register_or_zero_operand.
Rename into movtf_insn_sp64_hq.
(movtf_insn_sp64): Delete.
(movtf_insn_vis_sp64): Use register_or_zero_operand.
Rename into movtf_insn_sp64.
(movtf_no_e_insn_sp64): Use register_or_zero_operand.
Rename into movtf_insn_sp64_no_fpu.
From-SVN: r99506
* tree-outof-ssa.c (_elim_graph): Change the type of nodes and
const_copies to VEC(tree,heap)*.
(new_elim_graph, delete_elim_graph, elim_graph_size,
elim_graph_add_node, eliminate_build, eliminate_phi): Use VEC
instead of VARRAY.
From-SVN: r99497
2005-05-09 David Daney <ddaney@avtrex.com>
* java/util/BitSet.java (get(int, int)): Fix breakage when
requested set doesn't start on a multiple of 64.
From-SVN: r99492
* inclhack.def (stdio_stdarg_h, stdio_va_list): Bypass on
*-*-solaris2.1[0-9]*, not just *-*-solaris2.1[0-9].
* fixincl.x: Regenerate.
From-SVN: r99487