Paul Thomas [Mon, 3 Apr 2006 04:20:57 +0000 (04:20 +0000)]
re PR testsuite/26981 (g++.old-deja/g++.other/init18.C fails)
2006-04-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/26981
* trans.h : Prototype for gfc_conv_missing_dummy.
* trans-expr (gfc_conv_missing_dummy): New function
(gfc_conv_function_call): Call it and tidy up some of the code.
* trans-intrinsic (gfc_conv_intrinsic_function_args): The same.
PR fortran/26976
* array.c (gfc_array_dimen_size): If available, return shape[dimen].
* resolve.c (resolve_function): If available, use the argument shape for the
function expression.
* iresolve.c (gfc_resolve_transfer): Set shape[0] = size.
2006-04-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/26981
* gfortran.dg/missing_optional_dummy_1.f90: New test.
PR fortran/26976
* gfortran.dg/compliant_elemental_intrinsics_1.f90: New test.
* gfortran.dg/initialization_1.f90: Make assignment compliant.
* gfortran.dg/transfer_array_intrinsic_1.f90: Simplify.
* gfortran.dg/transfer_array_intrinsic_2.f90: Make assignments compliant and detect
bigendian-ness.
Erik Edelmann [Sun, 2 Apr 2006 17:00:39 +0000 (17:00 +0000)]
trans-array.c (gfc_trans_dealloc_allocated): Take a tree representation of the array to be deallocated as argument instead...
2006-04-02 Erik Edelmann <eedelman@gcc.gnu.org>
* trans-array.c (gfc_trans_dealloc_allocated): Take a
tree representation of the array to be deallocated as argument
instead of its gfc_symbol.
(gfc_trans_deferred_array): Update call to
gfc_trans_dealloc_allocated.
* trans-array.h (gfc_trans_dealloc_allocated): Update prototype.
* trans-expr.c (gfc_conv_function_call): Update call to
gfc_trans_dealloc_allocated, get indirect reference to dummy
arguments.
2006-04-02 Erik Edelmann <eedelman@gcc.gnu.org>
* gfortran.dg/allocatable_dummy_1.f90: Also check that allocatable
dummy arguments work when the actual argument is itself a dummy
argument of the caller.
Sebastian Pop [Sun, 2 Apr 2006 04:27:40 +0000 (06:27 +0200)]
tree-scalar-evolution.c (add_to_evolution_1): Pass an extra argument at_stmt.
* tree-scalar-evolution.c (add_to_evolution_1): Pass an extra argument
at_stmt. Convert the type of operands before calling
build_polynomial_chrec.
(add_to_evolution): Pass an extra argument at_stmt. Adjust the call to
add_to_evolution_1.
(follow_ssa_edge_in_rhs): Adjust call to add_to_evolution.
(instantiate_parameters_1): Convert the type of operands before calling
build_polynomial_chrec.
* tree-chrec.c (chrec_fold_poly_cst, chrec_fold_plus_poly_poly,
chrec_fold_multiply_poly_poly, chrec_replace_initial_condition,
reset_evolution_in_loop): Insert asserts to check the types of the
operands.
(chrec_type): Moved...
(eq_evolutions_p): Use operand_equal_p.
* tree-chrec.h (build_polynomial_chrec): Insert an assert to check
the types of the operands.
(chrec_type): ...here.
* tree-data-ref.c (create_data_ref): Convert the operands before
calling chrec_replace_initial_condition.
(same_access_functions, analyze_subscript_affine_affine,
analyze_miv_subscript, all_chrecs_equal_p): Use eq_evolutions_p.
(compute_subscript_distance, analyze_ziv_subscript,
analyze_siv_subscript_cst_affine, compute_overlap_steps_for_affine_1_2,
analyze_miv_subscript): Convert the operands before calling
chrec_fold_minus or chrec_fold_plus.
Sebastian Pop [Sun, 2 Apr 2006 04:08:02 +0000 (06:08 +0200)]
tree-data-ref.c (compute_all_dependences): Use a pointer to the dependence_relations vector.
* tree-data-ref.c (compute_all_dependences): Use a pointer to
the dependence_relations vector.
(compute_data_dependences_for_loop): Adjust call to
compute_all_dependences.
Roger Sayle [Sat, 1 Apr 2006 19:19:22 +0000 (19:19 +0000)]
re PR fortran/25270 (testcases fail with a type mismatch)
PR fortran/25270
* trans-array.c (gfc_trans_allocate_array_storage): In array index
calculations use gfc_index_zero_node and gfc_index_one_node instead
of integer_zero_node and integer_one_node respectively.
(gfc_conv_array_transpose): Likewise.
(gfc_conv_ss_startstride): Likewise.
(gfc_trans_dummy_array_bias): Likewise.
Roger Sayle [Sat, 1 Apr 2006 07:11:35 +0000 (07:11 +0000)]
dependency.c (gfc_dep_compare_expr): Strip parentheses and unary plus operators when comparing expressions.
* dependency.c (gfc_dep_compare_expr): Strip parentheses and unary
plus operators when comparing expressions. Handle comparisons of
the form "X+C vs. X", "X vs. X+C", "X-C vs. X" and "X vs. X-C" where
C is an integer constant. Handle comparisons of the form "P+Q vs.
R+S" and "P-Q vs. R-S". Handle comparisons of integral extensions
specially (increasing functions) so extend(A) > extend(B), when A>B.
(gfc_check_element_vs_element): Move test later, so that we ignore
the fact that "A < B" or "A > B" when A or B contains a forall index.
* gfortran.dg/dependency_14.f90: New test case.
* gfortran.dg/dependency_15.f90: Likewise.
* gfortran.dg/dependency_16.f90: Likewise.
Bob Wilson [Sat, 1 Apr 2006 01:29:11 +0000 (01:29 +0000)]
lib1funcs.asm: Rename abi_entry/abi_return macros to leaf_entry/leaf_return.
* config/xtensa/lib1funcs.asm: Rename abi_entry/abi_return macros
to leaf_entry/leaf_return. Change leaf_entry to add 16 bytes to
the frame size. Update to use the new macros.
* config/xtensa/ieee754-sf.S: Use new leaf_entry/leaf_return macros.
* config/xtensa/ieee754-df.S: Likewise.
* tree-cfg.c (make_ctrl_stmt_edges, make_exit_edges): Merge into...
(make_edges): ... here. Control fallthru creation with a local
variable. Do not play with fake edges.
(make_omp_sections_edges): Don't set EDGE_ABNORMAL.
(make_goto_expr_edges): Don't play with fake edges. Make for_call
a boolean.
Joseph Myers [Sat, 1 Apr 2006 00:21:46 +0000 (01:21 +0100)]
dwarf2.h (DW64_CIE_ID): Define.
* dwarf2.h (DW64_CIE_ID): Define.
* dwarf2out.c (DWARF_CIE_ID): Define.
(output_call_frame_info): Output 0xffffffff before standard 8-byte
length header. Use DWARF_CIE_ID.
(value_format): Use DW_FORM_data4 or DW_FORM_data8 for
dw_val_class_loc_list depending on DWARF_OFFSET_SIZE.
Mark Mitchell [Fri, 31 Mar 2006 22:16:35 +0000 (22:16 +0000)]
pex-win32.c (<errno.h>): Include.
* pex-win32.c (<errno.h>): Include.
(fix_argv): Remove.
(argv_to_cmdline): New function.
(std_suffixes): New variable.
(no_suffixes): Likewise.
(find_executable): New function.
(win32_spawn): Likewise.
(spawn_script): Use win32_spawn instead of _spawnv[p].
(pex_win32_exec_child): Replace MSVCRT calls with Win32 API calls.
(pex_win32_wait): Likewise.
Andrew Haley [Fri, 31 Mar 2006 11:43:43 +0000 (11:43 +0000)]
re PR libgcj/26858 (NullPointerException not generated for large classes...)
2006-03-30 Andrew Haley <aph@redhat.com>
PR java/26858
* lang.c (java_attribute_table): New.
(LANG_HOOKS_ATTRIBUTE_TABLE): Define.
* expr.c (build_field_ref): Add a null pointer check for all
fields of offset > 4k. Don't do so for accesses via the this
pointer, which we know can never be null.
* class.c (build_java_method_type): Mark arg 1 of all nonstatic
methods nonnull.
Jerry DeLisle [Fri, 31 Mar 2006 05:11:03 +0000 (05:11 +0000)]
re PR libfortran/26890 (SIZE parameter interacts with same variable in IO list character length specification.)
2006-03-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/26890
* io/io.h: Add size_used to st_parameter_dt, adjust pad size.
*io/transfer.c (data_transfer_init): Initialize size_used to zero.
(read_sf): Use size_used.
(read_block): Likewise.
(read_block_direct): Likewise.
(write_block): Likewise.
(write_buf): Likewise and eliminate erroneous FAILURE return.
(finalize_transfer): Assign value of size_used to *dtp->size.
Alan Modra [Fri, 31 Mar 2006 00:27:51 +0000 (00:27 +0000)]
rs6000.c (rs6000_explicit_options): Add ieee.
* config/rs6000/rs6000.c (rs6000_explicit_options): Add ieee.
(rs6000_override_options): Use it.
(rs6000_handle_option): Set it. Set rs6000_explicit_options.abi
only for -mabi=spe/no-spe and -mabi=altivec.
Roger Sayle [Thu, 30 Mar 2006 22:37:55 +0000 (22:37 +0000)]
re PR middle-end/22375 (fold_builtins creates mis-matched types)
PR middle-end/22375
* trans.c (gfc_trans_runtime_check): Promote the arguments of
__builtin_expect to the correct types, and the result back to
boolean_type_node.
Roger Sayle [Thu, 30 Mar 2006 17:47:48 +0000 (17:47 +0000)]
re PR target/17959 (-mpowerpc64 can cause worse code than without it)
PR target/17959
* expr.c (emit_group_store): Optimize group stores into a pseudo
register by using a paradoxical subreg to initialize the destination
if the first or last member of the group specifies a "low part".
Thomas Koenig [Thu, 30 Mar 2006 16:30:26 +0000 (16:30 +0000)]
re PR fortran/25031 ([4.1 only] Allocatable array can be reallocated.)
2006-03-30 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/25031
* runtime/memory.c (allocate_array): If stat is present and
the variable is already allocated, free the variable, do
the allocation and set stat.
(allocate_array_64): Likewise. Whitespace fix.
2006-03-30 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/25031
* gfortran.dg/multiple_allocation_1.f90: Check that the
size has changed after a re-allocation with stat.
Maxim Kuvyrkov [Thu, 30 Mar 2006 15:41:00 +0000 (15:41 +0000)]
re PR target/26734 (GCC cannot bootstrap on IA64 HP-UX)
2006-03-30 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
PR target/26734
* rtl.def (DEPS_LIST): Change type of the second operand to 'int'.
* target.h (struct gcc_target.speculate_insn): Change type of the
second parameter to 'int'.
* lists.c (alloc_DEPS_LIST): Change signature. Update reference to
the second operand of the DEPS_LIST.
(copy_DEPS_LIST_list): Update reference to the second operand of the
DEPS_LIST.
* rtl.h (alloc_DEPS_LIST): Update signature.
* sched-int.h (ds_t): Change typedef to 'int'.
(DEP_STATUS, BITS_PER_DEP_STATUS): Update.
Maxim Kuvyrkov [Thu, 30 Mar 2006 15:33:18 +0000 (15:33 +0000)]
haifa-sched.c (try_ready): Change condition to restore non-speculative pattern of the instruction.
2006-03-30 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
* haifa-sched.c (try_ready): Change condition to restore
non-speculative pattern of the instruction.
(process_insn_depend_be_in_spec): Code to keep probability of the
speculative dependence non-decreasing.
Paolo Bonzini [Thu, 30 Mar 2006 14:31:13 +0000 (14:31 +0000)]
re PR tree-optimization/26830 (Repeated SSA update during loop header copying)
2006-03-30 Paolo Bonzini <bonzini@gnu.org>
PR tree-optimization/26830
* tree-ssa-copy.c (copy_prop_visit_assignment): Do not check loop depth.
(copy_prop_visit_stmt): Remove write-only variable ann.
(init_copy_prop): Check variable loop depth here. Do not simulate
memory-tag and virtual operand PHIs except for store copy prop.
Roger Sayle [Wed, 29 Mar 2006 22:40:17 +0000 (22:40 +0000)]
stor-layout.c (mode_for_size_tree): Remove restiction on type sizes by correctly testing whether the size fits a...
* stor-layout.c (mode_for_size_tree): Remove restiction on type
sizes by correctly testing whether the size fits a host integer.
(initialize_sizetypes): Use set_min_and_max_values_for_integral_type
to correctly set TYPE_MIN_VALUE and TYPE_MAX_VALUE to the full
SImode range for the default sizetype and bitsizetype.
Roger Sayle [Wed, 29 Mar 2006 21:55:34 +0000 (21:55 +0000)]
convert.c (convert_to_pointer): Preserve the TREE_OVERFLOW and TREE_CONSTANT_OVERFLOW bits of the argument.
* convert.c (convert_to_pointer): Preserve the TREE_OVERFLOW
and TREE_CONSTANT_OVERFLOW bits of the argument. Return
quickly if the argument is already of the correct type.
Call fold_build1 instead of build1. Tidy up blank lines.
David Edelsohn [Wed, 29 Mar 2006 21:07:12 +0000 (21:07 +0000)]
genemit.c (main): Add tm-constrs.h to included headers.
* genemit.c (main): Add tm-constrs.h to included headers.
* genoutput.c (output_prologue): Add tm-constrs.h to included headers.
* genpeep.c (main): Add tm-constrs.h to included headers.
* genpreds.c (write_satisfies_constraint_fns): Rename to ...
(write_tm_constrs_h): this and write complete file.
(write_tm_preds_h): Do not emit satisfies_constraint fns.
(write_insn_preds_c): Add tm-constrs.h to included headers.
(gen_constrs): New variable.
(parse_option): Parse "-c".
(main): Invoke write_tm_constrs_h.
* genrecog.c (write_header): Add tm-constrs.h to included headers.
* Makefile.in (STAGECOPYSTUFF): Add tm-constrs.h.
(object_out_file): Add tm-constrs.h dependency.
(insn-emit.o): Same.
(insn-output.o): Same.
(insn-peep.o): Same.
(insn-preds.o): Same.
(insn-recog.o): Same.
(tm-constsr.h): New target.
(s-constrs-h): New target.
* config/rs6000/constraints.md: New file.
* config/rs6000/rs6000.c: Include tm-constrs.h.
(num_insn_constant_wide): Convert to satisfies_constraint.
(rs6000_rtx_costs): Convert to satisfies_constraint.
* config/rs6000/rs6000.h (REG_CLASS_FROM_LETTER): Delete.
(CONST_OK_FOR_LETTER_P): Delete.
(CONST_DOUBLE_OK_FOR_LETTER_P): Delete.
(EXTRA_CONSTRAINT): Delete.
(EXTRA_MEMORY_CONSTRAINT): Delete.
(EXTRA_ADDRESS_CONSTRAINT): Delete.
* config/rs6000/predicates.md: Convert to satisfies_constraint.
* config/rs6000/rs6000.md: Include constraints.md. Convert to
satisfies_constraint.
Sebastian Pop [Wed, 29 Mar 2006 17:20:24 +0000 (19:20 +0200)]
re PR tree-optimization/26859 (ICE Segmentation Fault)
PR tree-optimization/26859
* tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): Avoid
division by zero.
(convert_step): Remove TREE_OVERFLOW and TREE_CONSTANT_OVERFLOW flags
for the step after fold_convert.
Zdenek Dvorak [Wed, 29 Mar 2006 01:41:27 +0000 (03:41 +0200)]
re PR tree-optimization/25985 (with optimization integer math fails)
PR tree-optimization/25985
* tree-ssa-loop-niter.c (number_of_iterations_le,
number_of_iterations_ne): Make comments more precise.
(number_of_iterations_cond): Add only_exit argument. Use the
fact that signed variables do not overflow only when only_exit
is true.
(loop_only_exit_p): New.
(number_of_iterations_exit): Pass result of loop_only_exit_p to
number_of_iterations_cond.
Roger Sayle [Tue, 28 Mar 2006 17:55:26 +0000 (17:55 +0000)]
fold-const.c (fold_binary): Fold (X & Y) ^ Y as the equivalent ~X & Y, and the symmetry related transformations.
* fold-const.c (fold_binary) <BIT_XOR_EXPR>: Fold (X & Y) ^ Y as
the equivalent ~X & Y, and the symmetry related transformations.
(fold_binary) <BIT_AND_EXPR>: Similarly, fold (X ^ Y) & Y as
~X & Y, and symmetry related transforms.
* gcc.dg/fold-andxor-1.c: New test case.
* gcc.dg/fold-xorand-1.c: Likewise.
Roger Sayle [Tue, 28 Mar 2006 17:06:19 +0000 (17:06 +0000)]
fold-const.c (fold_unary): Fold (T1)(~(T2)X) as ~(T1)X...
* fold-const.c (fold_unary) <NOP_EXPR>: Fold (T1)(~(T2)X) as
~(T1)X, when T1 and T2 are integer types of the same precision
and (T2)X isn't an extension.
Jeff Law [Tue, 28 Mar 2006 15:35:47 +0000 (08:35 -0700)]
re PR tree-optimization/26796 (ACATS ICE c34002a c52005 spurious storage_error)
PR tree-optimization/26796
* tree-ssa-dom.c (propagate_rhs_into_lhs): Queue blocks which
need EH edge cleanups rather than purging them immediately.
(eliminate_degenerate_phis): Handle queued EH cleanups.
Maxim Kuvyrkov [Mon, 27 Mar 2006 22:59:07 +0000 (22:59 +0000)]
rtl.def (Copyright): Update date.
2006-03-27 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
* rtl.def (Copyright): Update date.
(DEPS_LIST): Change type of the second operand to 'int'.
* target.h (Copyright): Update date.
(struct gcc_target.speculate_insn): Change type of the second parameter
to 'int'.
* lists.c (Copyright): Update date.
(alloc_DEPS_LIST): Change signature. Update reference to the second
operand of the DEPS_LIST.
(copy_DEPS_LIST_list): Update reference to the second operand of the
DEPS_LIST.
* rtl.h (Copyright): Update date.
(alloc_DEPS_LIST): Update signature.
* sched-int.h (Copyright): Update date.
(ds_t): Change typedef to 'int'.
(DEP_STATUS, BITS_PER_DEP_STATUS): Update.
Maxim Kuvyrkov [Mon, 27 Mar 2006 22:38:06 +0000 (22:38 +0000)]
haifa-sched.c (Copyright): Update date.
2006-03-27 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
* haifa-sched.c (Copyright): Update date.
(try_ready): Change condition to restore non-speculative pattern
of the instruction.
(process_insn_depend_be_in_spec): Code to keep probability of the
speculative dependence non-decreasing.
J"orn Rennecke [Mon, 27 Mar 2006 15:59:27 +0000 (15:59 +0000)]
t-sh ($(T)libic_invalidate_array_4-100.a): Fix rule to use lib prefix for target.
* config/sh/t-sh ($(T)libic_invalidate_array_4-100.a): Fix rule
to use lib prefix for target.
($(T)libic_invalidate_array_4-200.a): Likewise.
($(T)libic_invalidate_array_4a.a): Likewise.