Mikael Morin [Fri, 4 Nov 2011 00:31:19 +0000 (00:31 +0000)]
re PR fortran/43829 (Scalarization of reductions)
PR fortran/43829
* trans-array.c (gfc_conv_expr_descriptor): Accept the inline intrinsic
case in the assertion.
* trans-intrinsic (enter_nested_loop): New function.
(gfc_conv_intrinsic_arith): Support non-scalar cases.
(nest_loop_dimension, walk_inline_intrinsic_arith): New functions.
(walk_inline_intrinsic_function): Handle sum and product.
(gfc_inline_intrinsic_function_p): Ditto.
* trans.h (gfc_get_loopinfo): New macro.
Mikael Morin [Fri, 4 Nov 2011 00:14:58 +0000 (00:14 +0000)]
frontend-passes.c (cfe_register_funcs): Return early in the case of an inline intrinsic function.
* frontend-passes.c (cfe_register_funcs): Return early in the case
of an inline intrinsic function.
(optimize_binop_array_assignment): Skip optimization in the case of
an inline intrinsic function.
Mikael Morin [Fri, 4 Nov 2011 00:11:39 +0000 (00:11 +0000)]
trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Set loop's temporary rank to the loop rank.
* trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Set loop's
temporary rank to the loop rank. Mark ss chains for multiple loop
if necessary. Use gfc_trans_scalarized_loop_boundary to end one loop
and start another.
Mikael Morin [Fri, 4 Nov 2011 00:09:27 +0000 (00:09 +0000)]
trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set loop's temporary rank to the loop rank.
* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set loop's
temporary rank to the loop rank. Mark ss chains for multiple loop
if necessary. Use gfc_trans_scalarized_loop_boundary to end one loop
and start another.
Mikael Morin [Fri, 4 Nov 2011 00:04:27 +0000 (00:04 +0000)]
trans-expr.c (gfc_conv_procedure_call): Handle temporaries for arguments to elemental calls.
* trans-expr.c (gfc_conv_procedure_call): Handle temporaries for
arguments to elemental calls.
* trans-stmt.c (replace_ss): New function.
(gfc_conv_elemental_dependencies): Remove temporary loop handling.
Create a new ss for the temporary and replace the original one with it.
Remove fake array references. Recalculate all offsets.
Mikael Morin [Fri, 4 Nov 2011 00:00:23 +0000 (00:00 +0000)]
trans-array.h (gfc_free_ss, [...]): New prototypes.
* trans-array.h (gfc_free_ss, gfc_set_delta): New prototypes.
* trans-array.c (gfc_free_ss): Remove forward declaration.
Make non-static.
(set_delta, gfc_set_delta): Remove forward declaration.
Make non-static and rename the former to the later. Update uses.
Mikael Morin [Thu, 3 Nov 2011 23:53:42 +0000 (23:53 +0000)]
trans-array.c (outermost_loop): New function.
* trans-array.c (outermost_loop): New function.
(gfc_trans_array_constructor, gfc_set_vector_loop_bounds,
gfc_add_loop_ss_code): Put generated code out of the outermost loop.
* trans-array.c (gfc_add_loop_ss_code): Skip non-nestedmost ss.
Call recursively gfc_add_loop_ss_code for all the nested loops.
(gfc_conv_ss_startstride): Only get the descriptor for the outermost
ss. Call recursively gfc_conv_ss_startstride for all the nested loops.
(set_loop_bounds): Call recursively for all the nested loops.
(set_delta): Ditto.
Mikael Morin [Thu, 3 Nov 2011 23:39:11 +0000 (23:39 +0000)]
trans.h (struct gfc_loopinfo): New fields nested and next.
* trans.h (struct gfc_loopinfo): New fields nested and next.
* trans-array.c (gfc_add_ss_to_loop): Update list of nested list if
ss has non-null nested_ss field.
Mikael Morin [Thu, 3 Nov 2011 23:34:53 +0000 (23:34 +0000)]
trans-array.c (get_array_ref_dim, [...]): Rename the former to the latter and loop over the parents.
* trans-array.c (get_array_ref_dim, get_scalarizer_dim_for_array_dim):
Rename the former to the latter and loop over the parents.
(innermost_ss): New function.
(get_array_ref_dim_for_loop_dim): New function.
(gfc_trans_create_temp_array): Use get_scalarizer_dim_for_array_dim.
(set_loop_bounds): Use get_array_dim_for_loop_dim).
Mikael Morin [Thu, 3 Nov 2011 23:17:08 +0000 (23:17 +0000)]
trans.h (struct gfc_ss): New field parent.
* trans.h (struct gfc_ss): New field parent.
* trans-array.c (gfc_trans_scalarizing_loops): Skip clearing if a
parent exists.
* trans-expr.c (gfc_advance_se_ss_chain): Move to parent ss at the
end of the chain.
Mikael Morin [Thu, 3 Nov 2011 22:59:29 +0000 (22:59 +0000)]
trans-array.c (gfc_trans_array_constructor, [...]): Rename the former to the later.
* trans-array.c (gfc_trans_array_constructor, trans_array_constructor):
Rename the former to the later. Get loop from ss.
Remove loop argument.
(gfc_add_loop_ss_code): Update call.
Mikael Morin [Thu, 3 Nov 2011 22:50:06 +0000 (22:50 +0000)]
trans.h (struct gfc_ss_info): New field refcount.
* trans.h (struct gfc_ss_info): New field refcount.
* trans-array.c (free_ss_info): Decrement refcount. Return early if
still non-zero.
(gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss): Increment
refcount.
Mikael Morin [Thu, 3 Nov 2011 22:40:55 +0000 (22:40 +0000)]
trans-array.c (set_loop_bounds): Separate the beginning of gfc_conv_loop_setup into a function of its own.
* trans-array.c (set_loop_bounds): Separate the beginning of
gfc_conv_loop_setup into a function of its own.
(set_delta): Separate the end of gfc_conv_loop_setup into a function
of its own.
(gfc_conv_loop_setup): Call set_loop_bounds and set delta.
(set_loop_bounds, set_delta, gfc_conv_loop_setup): Make loopspec a
pointer to the specloop field from the loop struct.
Mikael Morin [Thu, 3 Nov 2011 22:04:50 +0000 (22:04 +0000)]
trans.h (struct gfc_ss, [...]): Move field string_length from the former struct to the latter.
* trans.h (struct gfc_ss, struct gfc_ss_info): Move field
string_length from the former struct to the latter.
* trans-array.c
(gfc_get_temp_ss, gfc_trans_array_constructor, gfc_add_loop_ss_code,
gfc_conv_ss_descriptor, gfc_conv_scalarized_array_ref,
gfc_conv_resolve_dependencies, gfc_conv_loop_setup,
gfc_conv_expr_descriptor): Update references to string_length and
factor common reference chains where possible.
* trans-const.c (gfc_conv_constant): Ditto.
* trans-expr.c (gfc_conv_variable, gfc_conv_subref_array_arg,
gfc_conv_expr): Ditto.
Mikael Morin [Thu, 3 Nov 2011 21:47:49 +0000 (21:47 +0000)]
trans.h (struct gfc_ss, [...]): Move shape field from the former struct to the latter.
* trans.h (struct gfc_ss, struct gfc_array_info): Move shape field
from the former struct to the latter.
* trans-array.c (gfc_conv_ss_startstride, gfc_conv_loop_setup):
Update field references.
* trans-expr.c (gfc_trans_subarray_assign): Update field references
and factor common reference chains.
* trans-io.c (transfer_array_component): Ditto.
Mikael Morin [Thu, 3 Nov 2011 21:35:35 +0000 (21:35 +0000)]
trans-array.c (dim_ok, [...]): Rename the former to the latter.
* trans-array.c (dim_ok, transposed_dims): Rename the former to the
latter. Change argument type. Invert return value.
(gfc_conv_expr_descriptor): Update calls.
Mikael Morin [Thu, 3 Nov 2011 21:33:28 +0000 (21:33 +0000)]
trans-array.c (get_array_ref_dim): Change argument type and name.
* trans-array.c (get_array_ref_dim): Change argument type and name.
Obtain previous argument from the new argument in the body.
(gfc_trans_create_temp_arry, gfc_conv_loop_setup): Update calls.
Mikael Morin [Thu, 3 Nov 2011 21:31:12 +0000 (21:31 +0000)]
trans-array.c (gfc_set_vector_loop_bounds, [...]): Rename the former to the latter.
* trans-array.c (gfc_set_vector_loop_bounds, set_vector_loop_bounds):
Rename the former to the latter. Change type and name of argument.
Get previous argument from the new one.
(gfc_add_loop_ss_code): Update call.
Mikael Morin [Thu, 3 Nov 2011 21:28:26 +0000 (21:28 +0000)]
trans-array.h (gfc_trans_create_temp_array): Replace info argument with ss argument.
* trans-array.h (gfc_trans_create_temp_array): Replace info argument
with ss argument.
* trans-array.c (gfc_trans_create_temp_array): Ditto. Get info from ss.
(gfc_trans_array_constructor, gfc_conv_loop_setup): Update call to
gfc_trans_create_temp_array.
* trans-expr.c (gfc_conv_procedure_call): Ditto.
* trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
* trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
Mikael Morin [Thu, 3 Nov 2011 21:21:30 +0000 (21:21 +0000)]
trans-array.c (gfc_trans_array_bound_check, [...]): Rename the former to the latter.
* trans-array.c (gfc_trans_array_bound_check,
trans_array_bound_check): Rename the former to the latter.
Replace descriptor argument with ss argument. Get descriptor from ss.
(gfc_conv_array_index_offset, conv_array_index_offset): Rename the
former to the latter. Update call to trans_array_bound_check.
Replace info argument with ss argument. Get info from ss.
(gfc_conv_scalarized_array_ref): Update call to conv_array_index_offset.
(add_array_offset): Ditto
Mikael Morin [Thu, 3 Nov 2011 21:19:27 +0000 (21:19 +0000)]
trans-array.c (gfc_trans_constant_array_constructor, [...]): Rename the former to the latter.
* trans-array.c (gfc_trans_constant_array_constructor,
trans_constant_array_constructor): Rename the former to the latter.
Don't set the rank of the temporary for the loop. Remove then unused
loop argument.
(gfc_trans_array_constructor): Update call.
* config.host (crisv32-*-none, cris-*-none): Remove.
(crisv32-*-elf): Append to tmake_file, don't just set it.
(cris-*-elf): Add missing t-fdpbit to tmake_file.
Rainer Orth [Thu, 3 Nov 2011 18:19:54 +0000 (18:19 +0000)]
Restore arm-eabi bootstrap (PR target/50978)
PR target/50978
* config/arm/t-bpabi: New file.
* config.gcc (arm*-*-linux*): Add arm/t-bpabi to tmake_file for
arm*-*-linux-*eabi.
(arm*-*-uclinux*): Add arm/t-bpabi to tmake_file for
arm*-*-uclinux*eabi.
(arm*-*-eabi*, arm*-*-symbianelf*): Add arm/t-bpabi to tmake_file
for arm*-*-eabi*.
Michael Matz [Thu, 3 Nov 2011 17:17:07 +0000 (17:17 +0000)]
re PR bootstrap/50857 (The compiler is built with exceptions and RTTI enabled)
libcpp/
PR bootstrap/50857
* configure.ac: Check for -fno-exceptions -fno-rtti.
* configure: Regenerate.
* Makefile.in (NOEXCEPTION_FLAGS): New flag.
(ALL_CXXFLAGS): Use it.
gcc/
PR bootstrap/50857
* configure.ac: Check for -fno-exceptions -fno-rtti.
* configure: Regenerate.
* Makefile.in (NOEXCEPTION_FLAGS): New flag.
(ALL_CXXFLAGS): Use it.
re PR lto/44965 (lto option code breaks file format with each added option)
2011-11-03 Richard Guenther <rguenther@suse.de>
PR lto/44965
* lto-opts.c: Re-implement.
* lto-streamer.h (lto_register_user_option): Remove.
(lto_read_file_options): Likewise.
(lto_reissue_options): Likewise.
(lto_clear_user_options): Likewise.
(lto_clear_file_options): Likewise.
* opts-global.c (post_handling_callback): Remove.
(set_default_handlers): Do not set post_handling_callback.
(decode_options): Remove LTO specific code.
* lto-wrapper.c (merge_and_complain): New function.
(run_gcc): Read all input file options and
prepend a merged set before the linker driver options.
* gcc.c (driver_post_handling_callback): Remove.
(set_option_handlers): Do not set post_handling_callback.
* opts-common.c (handle_option): Do not call post_handling_callback.
* opts.h (struct cl_option_handlers): Remove post_handling_callback.
lto/
* lto-lang.c (lto_post_options): Do not read file options.
* lto.c (lto_read_all_file_options): Remove.
(lto_init): Call lto_set_in_hooks here.
Martin Jambor [Thu, 3 Nov 2011 13:53:29 +0000 (14:53 +0100)]
ipa-prop.c (type_change_info): New fields offset, object, known_current_type and multiple_types_encountered.
2011-11-03 Martin Jambor <mjambor@suse.cz>
* ipa-prop.c (type_change_info): New fields offset, object,
known_current_type and multiple_types_encountered.
(extr_type_from_vtbl_ptr_store): New function.
(check_stmt_for_type_change): Use it, set multiple_types_encountered if
the result is different from the previous one.
(detect_type_change): Renamed to detect_type_change_1. New parameter
comp_type. Set up new fields in tci, build known type jump
functions if the new type can be identified.
(detect_type_change): New function.
* tree.h (DECL_CONTEXT): Comment new use.
David S. Miller [Thu, 3 Nov 2011 06:07:39 +0000 (06:07 +0000)]
Fix multilib build of libgcc on Linux/sparc.
* configure.ac: Set host_address on sparc too.
* configure: Regenerate.
* config.host: Add sparc/t-linux64 and sparc/t-softmul conditionally
based upon host_address.
* config/sparc/t-linux64: Set CRTSTUFF_T_CFLAGS unconditionally.
Peter Bergner [Thu, 3 Nov 2011 03:36:35 +0000 (22:36 -0500)]
rs6000.c (USE_HIDDEN_LINKONCE): New define.
* config/rs6000/rs6000.c (USE_HIDDEN_LINKONCE): New define.
(get_ppc476_thunk_name): Use it.
(rs6000_code_end): Likewise.
(macho_branch_islands): Fix typo.
Jason Merrill [Wed, 2 Nov 2011 21:24:56 +0000 (17:24 -0400)]
re PR c++/50930 ([C++0x] Valid brace-or-equal-initializer of non-static data member rejected)
PR c++/50930
* init.c (build_aggr_init): Don't set LOOKUP_ONLYCONVERTING
if the initializer has TARGET_EXPR_DIRECT_INIT_P.
(expand_default_init): An initializer with TARGET_EXPR_DIRECT_INIT_P
or TARGET_EXPR_LIST_INIT_P doesn't need more processing.
* tree.c (bot_manip): Propagate TARGET_EXPR_IMPLICIT_P,
TARGET_EXPR_LIST_INIT_P, TARGET_EXPR_DIRECT_INIT_P.
* call.c (convert_like_real): Set TARGET_EXPR_DIRECT_INIT_P
as appropriate on list-value-initialization.