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
2006-02-04 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/25075
check.c (identical_dimen_shape): New function.
(check_dot_product): Use identical_dimen_shape() to check sizes
for dot_product.
(gfc_check_matmul): Likewise.
(gfc_check_merge): Check conformance between tsource and fsource
and between tsource and mask.
(gfc_check_pack): Check conformance between array and mask.
2006-02-04 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/25075
intrinsic_argument_conformance_1.f90: New test.
From-SVN: r110596
PR debug/24444
* config/ia64/ia64.c: Include debug.h.
(MAX_ARTIFICIAL_LABEL_BYTES): New.
(ia64_label_after_insn, ia64_dwarf2out_def_steady_cfa): New.
(IA64_CHANGE_CFA_IN_EPILOGUE): Define to 0.
(process_epilogue, process_set, process_for_unwind_directive):
Output unwind info only if requested. Add CFA info if requested.
Add new arguments as needed. Adjust callers.
* config/ia64/ia64.h (ARG_POINTER_CFA_OFFSET): Override
incorrect default.
(DWARF2_FRAME_INFO): Define to zero.
* config/ia64/unwind-ia64.c: Remove code that compensated for
the CFA offset error fixed above.
* config/ia64/t-ia64 (ia64.o): Depend on debug.h.
* dwarf2out.c (DWARF2_FRAME_INFO): Define default.
(dwarf2out_do_frame): Require nonzero DWARF2_UNWIND_INFO for
-funwind-tables and -fexceptions to enable frame info.
(dwarf2out_frame_init): Define initial CFA even if
DWARF2_UNWIND_INFO is disabled. Call initial_return_save if
DWARF2_UNWIND_INFO is nonzero, not just defined.
(dwarf2out_frame_finish): Output non-EH call frame info only
if DWARF2_FRAME_INFO is nonzero.
(convert_cfa_to_loc_list,
compute_frame_pointer_to_cfa_displacement): Define even if
unwind info is not supported.
(gen_subprogram_die): Use the above unconditionally. Remove
legacy alternate code.
* toplev.c (compile_file): Compile in call to
dwarf2out_frame_finish if DWARF2_DEBUGGING_INFO is defined.
(lang_dependent_init): Ditto for dwarf2out_frame_init.
From-SVN: r110594
* decl.c (java_init_decl_processing): Create char_type_node as a
regular INTEGER_TYPE node.
(push_promoted_type): Preserve TYPE_STRING_FLAG on types.
* typeck.c (convert): No longer check for CHAR_TYPEs but instead
test for char_type_node and promoted_char_type_node as special
instances of INTEGER_TYPE tree codes.
(promote_type,build_java_signature): Likewise.
* jcf-write.c (adjust_typed_op): Likewise.
* mangle.c (mangle_type): Likewise.
* parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
* parse.h (JINTEGRAL_TYPE_P): Likewise.
From-SVN: r110592
* config/rs6000/rs6000.c (rs6000_mangle_fundamental_type): Mangle
IBM extended float format long double as "g" on powerpc*-linux.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r110589
PR c++/25979
* gimplify.c (gimplify_modify_expr_rhs): Disable *& optimization for now.
PR middle-end/25977
* gimplify.c (gimplify_modify_expr_rhs): It's not always safe to do RVO
on the return slot if it's an NRV.
From-SVN: r110565