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
* cgraph.c: Include lto-streamer.h
(change_decl_assembler_name): Work when assembler name hash is at place.
(cgraph_make_decl_local): When localizing COMDAT symbol at WPA stage, be
sure to rename it to avoid name clash.
* ipa.c (cgraph_externally_visible_p, function_and_variable_visibility):
Localize hidden symbols only when locally defined.
From-SVN: r162211
PR fortran/40206
* trans-stmt.c (gfc_trans_character_select): Always use NULL for high
in CASE_LABEL_EXPR and use NULL for low for the default case.
* gfortran.dg/select_char_3.f90: New test.
From-SVN: r162209
* trans.h (gfc_build_compare_string): Add CODE argument.
* trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Pass OP to
gfc_build_compare_string.
* trans-expr.c (gfc_conv_expr_op): Pass CODE to
gfc_build_compare_string.
(string_to_single_character): Rename len variable to length.
(gfc_optimize_len_trim): New function.
(gfc_build_compare_string): Add CODE argument. If it is EQ_EXPR
or NE_EXPR and one of the strings is string literal with LEN_TRIM
bigger than the length of the other string, they compare unequal.
From-SVN: r162208
2010-07-15 Magnus Granberg <zorry@gentoo.org>
Kevin F. Quinn <kevquinn@gentoo.org>
* builtins.c (expand_builtin_init_trampoline): If
-Wtrampolines make a warning.
* common.opt: Add -Wtrampolines.
* doc/invoke.texi: Add -Wtrampolines.
testsuite/
* gcc.dg/Wtrampolines.c: New.
Co-Authored-By: Kevin F. Quinn <kevquinn@gentoo.org>
From-SVN: r162205
2010-07-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/44934
* io/file_pos.c (st_endfile): Correctly set unit flags for form.
From-SVN: r162203
2010-07-14 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (gfc_conv_section_upper_bound): Remove
(gfc_conv_section_startstride): Don't set the upper bound in the
vector subscript case.
(gfc_conv_loop_setup): Don't use gfc_conv_section_upper_bound
From-SVN: r162191
Implement C++0x unrestricted unions (N2544)
* class.c (check_field_decl): Loosen union handling in C++0x.
* method.c (walk_field_subobs): Split out from...
(synthesized_method_walk): ...here. Set msg before loops.
(process_subob_fn): Check for triviality in union members.
* init.c (sort_mem_initializers): Splice out uninitialized
anonymous unions and union members.
(push_base_cleanups): Don't automatically destroy anonymous unions
and union members.
From-SVN: r162187