2006-02-07 Dirk Mueller <dmueller@suse.com>
* c.opt: C++ frontend supports -Wdiv-by-zero.
* c-opts.c (c_common_handle_option): Remove dead case.
* typeck.c (build_binary_op): Annotate div-by-zero
warnings to make -Wno-div-by-zero have an effect.
g++.dg/warn/Wdiv-by-zero.C: New test.
g++.dg/warn/Wno-div-by-zero.C: New.
From-SVN: r110712
2006-02-07 Andrew Haley <aph@redhat.com>
* expr.c (expand_invoke): (BC mode.) If we find a method in a
class other than the one in which we expected to find it, ignore
the result.
PR java/25535
* constants.c (build_constants_constructor): move initializer into
first halfword on a 6-bit big-endian machine.
From-SVN: r110710
* df-core.c (df_set_blocks): Do not dereference function pointers.
(df_finish1): Likewise.
(df_hybrid_search_forward): Likewise.
(df_hybrid_search_backward): Likewise.
(df_iterative_dataflow): Likewise.
(df_analyze_problem): Likewise.
(df_compact_blocks): Likewise.
(df_dump): Likewise.
* df-scan.c (df_rescan_blocks): Likewise.
(df_record_entry_block_defs): Likewise.
* genconditions.c (write_conditions): Guard the definition of
'insn_conditions' with the check on GCC version.
(write_writer): Guard the traversal 'insn_conditions' with
the check on GCC version.
From-SVN: r110702
2006-02-07 Rainer Emrich <r.emrich@de.tecosim.com>
* intrinsics/c99_functions.c: Work around incompatible
declarations of cabs{,f,l} on pre-C99 IRIX systems.
From-SVN: r110700
2006-02-07 Pete Steinmetz <steinmtz@us.ibm.com>
* sched-rgn.c (compute_dom_prob_ps, compute_trg_info): Eradicate
use of float in probability computations. Use edge probabilities
in place of statically computed probabilities.
(min_spec_prob): New static variable.
(schedule_insns): Initialize it.
(GET_SRC_PROB): Removed.
* doc/invoke.texi (min-sched-prob): Renamed to min-spec-prob.
From-SVN: r110690
2005-02-06 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/23815
* gfortran.texi: Document the GFORTRAN_CONVERT_UNIT environment
variable.
* invoke.texi: Mention the "Runtime" chapter.
Document the -fconvert= option.
* gfortran.h: Add options_convert.
* lang.opt: Add fconvert=little-endian, fconvert=big-endian,
fconvert=native and fconvert=swap.
* trans-decl.c (top level): Add gfor_fndecl_set_convert.
(gfc_build_builtin_function_decls): Set gfor_fndecl_set_convert.
(gfc_generate_function_code): If -fconvert was specified,
and this is the main program, add a call to set_convert().
* options.c: Handle the -fconvert options.
2005-02-06 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/23815
* runtime/environ.c (init_unformatted): Add GFORTRAN_CONVERT_UNIT
environment variable.
(top level): Add defines, type and static variables for
GFORTRAN_CONVERT_UNIT handling.
(search_unit): New function.
(match_word): New function.
(match_integer): New function.
(next_token): New function.
(push_token): New function.
(mark_single): New function.
(mark_range): New funciton.
(do_parse): New function.
(init_unformatted): New function.
(get_unformatted_convert): New function.
* runtime/compile_options.c: Add set_convert().
* libgfortran.h: Add convert to compile_options_t.
* io/open.c (st_open): Call get_unformatted_convert to get
unit default; if CONVERT_NONE is returned, check for
the presence of a CONVERT specifier and use it.
As default, use compile_options.convert.
* io/io.h (top level): Add CONVERT_NONE to unit_convert, to signal
"nothing has been set".
(top level): Add prototype for get_unformatted_convert.
2005-02-06 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/23815
* unf_io_convert_4.f90: New test.
From-SVN: r110664
* trans-stmt.c (gfc_evaluate_where_mask): Allow the NMASK argument
to be NULL to indicate that the not mask isn't required.
(gfc_trans_where_2): Remove PMASK argument. Avoid calculating the
pending mask for the last clause of a WHERE chain. Update recursive
call.
(gfc_trans_forall_1): Update call to gfc_trans_where_2.
(gfc_trans_where): Likewise.
From-SVN: r110659
Backport from gomp-20050608-branch
* trans-decl.c (create_function_arglist): Handle dummy functions.
* trans-decl.c (gfc_get_symbol_decl): Revert explicit setting of
TYPE_SIZE_UNIT.
(gfc_trans_vla_type_sizes): Also "gimplify"
GFC_TYPE_ARRAY_DATAPTR_TYPE for GFC_DESCRIPTOR_TYPE_P types.
* trans-array.c (gfc_trans_deferred_array): Call
gfc_trans_vla_type_sizes.
* trans-decl.c (saved_function_decls, saved_parent_function_decls):
Remove unnecessary initialization.
(create_function_arglist): Make sure __result has complete type.
(gfc_get_fake_result_decl): Change current_fake_result_decl into
a tree chain. For entry master, create a separate variable
for each result name. For BT_CHARACTER results, call
gfc_finish_var_decl on length even if it has been already created,
but not pushdecl'ed.
(gfc_trans_vla_type_sizes): For function/entry result, adjust
result value type, not the FUNCTION_TYPE.
(gfc_generate_function_code): Adjust for current_fake_result_decl
changes.
(gfc_trans_deferred_vars): Likewise. Call gfc_trans_vla_type_sizes
even on result if it is assumed-length character.
* trans-decl.c (gfc_trans_dummy_character): Add SYM argument.
Call gfc_trans_vla_type_sizes.
(gfc_trans_auto_character_variable): Call gfc_trans_vla_type_sizes.
(gfc_trans_vla_one_sizepos, gfc_trans_vla_type_sizes_1,
gfc_trans_vla_type_sizes): New functions.
(gfc_trans_deferred_vars): Adjust gfc_trans_dummy_character
callers. Call gfc_trans_vla_type_sizes on assumed-length
character parameters.
* trans-array.c (gfc_trans_array_bounds,
gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias): Call
gfc_trans_vla_type_sizes.
* trans.h (gfc_trans_vla_type_sizes): New prototype.
* trans-decl.c (gfc_build_qualified_array): For non-assumed-size
arrays without constant size, create also an index var for
GFC_TYPE_ARRAY_SIZE (type). If the type is incomplete, complete
it as 0..size-1.
(gfc_create_string_length): Don't call gfc_defer_symbol_init
if just creating DECL_ARGUMENTS.
(gfc_get_symbol_decl): Call gfc_finish_var_decl and
gfc_defer_symbol_init even if ts.cl->backend_decl is already
set to a VAR_DECL that doesn't have DECL_CONTEXT yet.
(create_function_arglist): Rework, so that hidden length
arguments for CHARACTER parameters are created together with
the parameters. Resolve ts.cl->backend_decl for CHARACTER
parameters. If the argument is a non-constant length array
or CHARACTER, ensure PARM_DECL has different type than
its DECL_ARG_TYPE.
(generate_local_decl): Call gfc_get_symbol_decl even
for non-referenced non-constant length CHARACTER parameters
after optionally issuing warnings.
* trans-array.c (gfc_trans_array_bounds): Set last stride
to GFC_TYPE_ARRAY_SIZE (type) to initialize it as well.
(gfc_trans_dummy_array_bias): Initialize GFC_TYPE_ARRAY_SIZE (type)
variable as well.
* trans-expr.c (gfc_conv_expr_val): Fix comment typo.
* trans-stmt.c (gfc_trans_simple_do): Fix comment.
From-SVN: r110653
2006-02-06 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-pre.c (bb_value_sets_t): Add antic_safe_loads.
(ANTIC_SAFE_LOADS): New macro.
(find_or_generate_expression): Add prototype.
(set_contains_value): Allow null set for sake of not always having
to allocate ANTIC_SAFE_LOADS.
(phi_translate): Move placement of AGGREGATE_TYPE_P check.
Allow COMPONENT_REF too.
(valid_in_set): Allow COMPONENT_REF.
Check ANTIC_SAFE_LOADS too.
(compute_antic_aux): Print out ANTIC_SAFE_LOADS.
(compute_rvuse_and_antic_safe): Add ANTIC_SAFE computation, and
rename.
(can_PRE_operation): Add COMPONENT_REF.
(create_component_ref_by_pieces): New function.
(create_expression_by_pieces): Use create_component_ref_by_pieces.
(insert_aux): Move AGGREGATE_TYPE_P check here.
(compute_avail): Set bb local stmt uids.
(pass_pre): Use TODO_update_ssa_only_virtuals.
2006-02-06 Daniel Berlin <dberlin@dberlin.org>
* gcc.dg/tree-ssa/loadpre10.c: New test.
* gcc.dg/tree-ssa/loadpre11.c: Ditto.
* gcc.dg/tree-ssa/loadpre6.c: Expect one more elimination.
* gcc.dg/tree-ssa/loadpre4.c: This should pass now.
From-SVN: r110644
PR libfortran/24685
* io/write.c (write_real): Widen the default format for real(10)
variables output.
* gfortran.dg/large_real_kind_form_io_2.f90: New test.
From-SVN: r110627
* dfp.c (decimal_real_arithmetic): Change second argument type
from int to enum tree_code. Do not always return true, but now
return result of any call to decimal_do helper functions.
* dfp.h (decimal_real_arithmetic): Update prototype.
From-SVN: r110626
* dependency.c (gfc_check_dependency): Remove unused vars and nvars
arguments. Replace with an "identical" argument. A full array
reference to the same symbol is a dependency if identical is true.
* dependency.h (gfc_check_dependency): Update prototype.
* trans-array.h (gfc_check_dependency): Delete duplicate prototype.
* trans-stmt.c: #include dependency.h for gfc_check_dependency.
(gfc_trans_forall_1): Update calls to gfc_check_dependency.
(gfc_trans_where_2): Likewise. Remove unneeded variables.
(gfc_trans_where_3): New function for simple non-dependent WHEREs.
(gfc_trans_where): Call gfc_trans_where_3 to translate simple
F90-style WHERE statements without internal dependencies.
* Make-lang.in (trans-stmt.o): Depend upon dependency.h.
From-SVN: r110625