2010-07-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/44953
* io/unix.c (mem_alloc_w4): Return gfc_char4_t instead of char type
pointer. (mem_write4): Remove cast to gfc_char4_t.
* io/transfer.c (write_block): Use a gfc_char4_t pointer.
(memset4): New helper function. (next_record_w): Use new helper
function rather than sset for internal units. Don't attempt to pad
with spaces if it is not needed.
* io/unix.h: Update prototype for mem_alloc_w4.
* io/write.c (memset4): Use gfc_char4_t pointer and chracter type.
Don't use multiply by 4 to compute offset. (memcpy4): Likewise.
(write_default_char4): Use a gfc_char4_t pointer and update memset4
and memcpy calls. (write_a): Likewise. (write_l): Likewise.
(write_boz): Likewise. (write_decimal): Likewise. (write_x): Likewise.
(write_char): Add support for character(kind=4) internal units that
was previously missed. (write_integer): Use a gfc_char4_t pointer and
update memset4 and memcpy calls. (write_character): Likewise.
(write_separator): Add support for character(kind=4) internal units
that was previously missed.
* write_float.def (output_float): Use a gfc_char4_t pointer and
update memset4 and memcpy calls. (write_infnan): Likewise.
(output_float_FMT_G_): Likewise.
From-SVN: r162304
* postreload.c (reload_combine_closest_single_use): Ignore the
number of uses for DEBUG_INSNs.
(fixup_debug_insns): New static function.
(reload_combine_recognize_const_pattern): Use it. Don't let the
main loop be affected by DEBUG_INSNs.
Really disallow moving adds past a jump insn.
(reload_combine_recognize_pattern): Don't update use_ruid here.
(reload_combine_note_use): Do it here.
(reload_combine): Use control_flow_insn_p rather than JUMP_P.
From-SVN: r162301
2010-07-19 Bingfeng Mei <bmei@broadcom.com>
* ddg.c (create_ddg): Exclude nodes of debug_insn in counting nodes
of a loop.
* loop-doloop.c (doloop_condition_get): Skip possible debug_insn.
From-SVN: r162300
* config/i386/darwin.h: Define darwin_emit_branch_islands.
(TARGET_MACHO_BRANCH_ISLANDS): New.
(FUNCTION_PROFILER): Use TARGET_MACHO_BRANCH_ISLANDS.
* config/i386/i386.h (TARGET_MACHO_BRANCH_ISLANDS): Define a
default value.
* config/i386/i386.c (output_pic_addr_const): Do not emit
branch islands unless TARGET_MACHO_BRANCH_ISLANDS is set.
(x86_output_mi_thunk): Adjust symbol creation.
* config/rs6000/darwin.h: Define darwin_emit_branch_islands.
Remove out of date comment.
* config/rs6000/rs6000.c (print_operand): Adjust symbol.
DARWIN_LINKER_GENERATES_ISLANDS: Remove.
DARWIN_GENERATE_ISLANDS: Ditto.
(output_call): Do not emit branch islands unless
darwin_emit_branch_islands is set.
* config/darwin.c: Declare darwin_emit_branch_islands.
(machopic_indirect_data_reference): Do not emit unless
darwin_emit_branch_islands is set.
(darwin_override_options): Set darwin_emit_branch_islands
where it is needed.
* config/darwin9.h
DARWIN_LINKER_GENERATES_ISLANDS: Remove.
From-SVN: r162299
2010-07-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/44353
* match.c (gfc_match_iterator): Remove error that iterator
cannot be INTENT(IN).
2010-07-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/44353
* gfortran.dg/data_implied_do_2.f03 : New test.
From-SVN: r162286
gcc/testsuite/
* gcc.target/mips/mips.exp (mips_option_groups): Add -mflip-mips16
to the "mips16" group.
(mips_using_mips16_p): New procedure.
(mips-dg-options): Use it.
From-SVN: r162284
gcc/
* config/mips/mips.c (mips16_build_call_stub): Zero-extend the
low half of a single-register SCmode return value before ORing
it with the high half.
* config/mips/mips16.S (MERGE_GPRf): Likewise.
gcc/testsuite/
* gcc.target/mips/mips16-attributes-4.c: New test.
From-SVN: r162283
PR testsuite/44418
* gcc.target/powerpc/recip-1.c: Do not run for powerpc*-apple-darwin*
* gcc.target/powerpc/recip-2.c: Ditto.
* gcc.target/powerpc/recip-3.c: Ditto.
From-SVN: r162277
2010-07-17 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (gfc_free_ss): Don't free beyond ss rank.
Access subscript through the "dim" field index.
(gfc_trans_create_temp_array): Access ss info through the "dim" field
index.
(gfc_conv_array_index_offset): Ditto.
(gfc_conv_loop_setup): Ditto.
(gfc_conv_expr_descriptor): Ditto.
(gfc_conv_ss_startstride): Ditto. Update call to
gfc_conv_section_startstride.
(gfc_conv_section_startstride): Set values along the array dimension.
Get array dimension directly from the argument.
From-SVN: r162276
2010-07-17 Jack Howarth <howarth@bromo.med.uc.edu>
PR target/44862
* Makefile.tpl (POSTSTAGE1_CXX_EXPORT):
Provide -B option to allow for link spec %s substitutions for
libstdc++.a on darwin.
* Makefile.in: Regenerate.
From-SVN: r162275
PR target/42235
* postreload.c (reload_cse_move2add): Return bool, true if anything.
changed. All callers changed.
(move2add_use_add2_insn): Likewise.
(move2add_use_add3_insn): Likewise.
(reload_cse_regs): If reload_cse_move2add changed anything, rerun
reload_combine.
(RELOAD_COMBINE_MAX_USES): Bump to 16.
(last_jump_ruid): New static variable.
(struct reg_use): New members CONTAINING_MEM and RUID.
(reg_state): New members ALL_OFFSETS_MATCH and REAL_STORE_RUID.
(reload_combine_split_one_ruid, reload_combine_split_ruids,
reload_combine_purge_insn_uses, reload_combine_closest_single_use
reload_combine_purge_reg_uses_after_ruid,
reload_combine_recognize_const_pattern): New static functions.
(reload_combine_recognize_pattern): Verify that ALL_OFFSETS_MATCH
is true for our reg and that we have available index regs.
(reload_combine_note_use): New args RUID and CONTAINING_MEM. All
callers changed. Use them to initialize fields in struct reg_use.
(reload_combine): Initialize last_jump_ruid. Be careful when to
take PREV_INSN of the scanned insn. Update REAL_STORE_RUID fields.
Call reload_combine_recognize_const_pattern.
(reload_combine_note_store): Update REAL_STORE_RUID field.
* gcc.target/arm/pr42235.c: New test.
From-SVN: r162270
* gcc.dg/guality/guality.exp: Run also c-c++-common/guality/ tests.
* gcc.dg/guality/guality.h: Include unistd.h. Make the header usable
in C++.
(gualcvt): New overloaded inline.
(GUALCVT): Use it for C++.
* g++.dg/guality/guality.exp: New.
* g++.dg/guality/guality.h: New.
* g++.dg/guality/redeclaration1.C: New test.
* g++.dg/dg.exp: Prune also guality/* tests.
* gcc.dg/guality/pr43141.c: Moved to...
* c-c++-common/guality/pr43141.c: ... here.
From-SVN: r162266
* config/rs6000/rs6000.c (rs6000_emit_sISEL): Let rs6000_emit_int_cmove
do all the work.
(rs6000_emit_int_cmove): Use function pointers for insn generation.
Don't force values into registers unnecessarily.
(output_isel): Assert that we're not given conditions we can't handle.
Delete corresponding code.
* config/rs6000/rs6000.md (isel_signed_<mode>): Use
scc_comparison_operator constraint. Permit 0 for the consequent
operand. Permit any GPR for the alternative operand.
(isel_unsigned_<mode>): Likewise.
From-SVN: r162263
2010-07-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/37077
* io/read.c (read_default_char4): Add support for reading into a
kind-4 character variable from a character(kind=4) internal unit.
* io/io.h (read_block_form4): Add prototype.
* io/unit.c (get_internal_unit): Add call to fbuf_init.
(free_internal_unit): Add call to fbuf_destroy. (get_unit): Fix
whitespace.
* io/transfer.c (read_sf_internal): Use fbuf_alloc to allocate a string
to recieve the wide characters translated to single byte chracters.
(read_block_form): Fix whitespace. (read_block_form4): New function to
read from a character(kind=4) internal unit into a character(kind=4)
variable. (read_block_direct): Fix whitespace. (write_block): Fix
whitespace. (formatted_transfer_scalar_read): Likewise.
(formatted_transfer_scalar_write): Likewise.
* io/write.c (write_character): Add support for list directed write of
a kind=1 character string to a character(kind=4) internal unit.
From-SVN: r162260
PR target/44942
* config/i386/i386-protos.h (ix86_function_arg_boundary): Change second
argument to const_tree.
* config/i386/i386.c (function_arg_advance): If padding needs to be
inserted before argument, increment cum->words by number of padding
words as well.
(contains_aligned_value_p): Change argument to const_tree.
(ix86_function_arg_boundary): Change second argument to const_tree.
* gcc.c-torture/execute/pr44942.c: New test.
* gcc.target/i386/pr44942.c: New test.
From-SVN: r162255
PR target/42235
* function.c (record_hard_reg_sets): New static function.
(assign_parm_setup_reg): If an optab for extending exists and the
generated code clobbbers no hard regs, emit the insn directly and
create a REG_EQUIV note.
From-SVN: r162240
PR c++/44909
* call.c (add_function_candidate): If we're working on an implicit
declaration, don't consider candidates that won't match.
* typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
* cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
Revert:
* cp-tree.h (struct lang_type_class): Add has_user_opeq.
(TYPE_HAS_USER_OPEQ): New.
* decl.c (grok_special_member_properties): Set it.
* class.c (add_implicitly_declared_members): Don't lazily declare
constructors/operator= if a base or member has a user-declared one.
(check_bases_and_members, check_bases): Adjust.
(check_field_decls, check_field_decl): Adjust.
From-SVN: r162233
* postreload.c (last_label_ruid, first_index_reg, last_index_reg):
New static variables.
(reload_combine_recognize_pattern): New static function, broken out
of reload_combine.
(reload_combine): Use it. Only initialize first_index_reg and
last_index_reg once.
From-SVN: r162228
PR target/44877
* config/spu/spu.c (spu_expand_builtin_1): Allow references
(as well as pointers) as argument to mask_for_load builtins.
From-SVN: r162220
2010-07-15 Daniel Kraft <d@domob.eu>
PR fortran/44709
* trans.h (struct gfc_wrapped_block): New struct.
(gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
(gfc_finish_wrapped_block): New method.
(gfc_init_default_dt): Add new init code to block rather than
returning it.
* trans-array.h (gfc_trans_auto_array_allocation): Use gfc_wrapped_block
(gfc_trans_dummy_array_bias): Ditto.
(gfc_trans_g77_array): Ditto.
(gfc_trans_deferred_array): Ditto.
* trans.c (gfc_add_expr_to_block): Call add_expr_to_chain.
(add_expr_to_chain): New method based on old gfc_add_expr_to_block.
(gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
(gfc_finish_wrapped_block): New method.
* trans-array.c (gfc_trans_auto_array_allocation): use gfc_wrapped_block
(gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
(gfc_trans_deferred_array): Ditto.
* trans-decl.c (gfc_trans_dummy_character): Ditto.
(gfc_trans_auto_character_variable), (gfc_trans_assign_aux_var): Ditto.
(init_intent_out_dt): Ditto.
(gfc_init_default_dt): Add new init code to block rather than
returning it.
(gfc_trans_deferred_vars): Use gfc_wrapped_block to collect all init
and cleanup code and put it all together.
From-SVN: r162219