2009-10-16 Richard Guenther <rguenther@suse.de>
PR lto/41713
* lto-streamer-out.c (lto_output_tree_ref): Handle DEBUG_EXPR_DECL
the same as VAR_DECL.
* gfortran.dg/lto/20091016-1_0.f90: New testcase.
From-SVN: r152902
2009-10-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* s-osinte-rtems.ads: Add mutex type to pthread_mutexattr_t
* s-stchop-rtems.adb: Correct binding to rtems_stack_checker_is_blown.
From-SVN: r152900
2009-10-16 Richard Guenther <rguenther@suse.de>
* gimple.c (iterative_hash_gimple_type): For integer types
also hash their minimum and maximum values and the string flag.
For array types hash their domain and the string flag.
From-SVN: r152899
2009-10-16 Richard Guenther <rguenther@suse.de>
* gimple.c (gimple_types_compatible_p): Restrict completing
types to record or unions. Simplify completion.
Do not merge records or unions with different
TYPE_STRUCTURAL_EQUALITY_P tag.
(iterative_hash_gimple_type): Restrict non-recursing into
pointer targets for records and unions.
From-SVN: r152898
PR debug/41717
* cfgexpand.c (expand_debug_expr): Handle CONJ_EXPR.
* dwarf2out.c (mem_loc_descriptor): Don't handle
POST_INT/POST_DEC/POST_MODIFY like SUBREG. For SUBREG
punt if it is not lowpart subreg or if inner mode isn't
MODE_INT.
* gcc.dg/debug/pr41717.c: New test.
From-SVN: r152897
2009-10-16 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.c (s390_z10_optimize_cmp): Skip notes when
investigating previous or next insns.
From-SVN: r152896
2009-10-15 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/40654
PR libstdc++/40826
* src/atomic.cc (atomic_flag_test_and_set_explicit): Add
static_cast from base to derived.
(atomic_flag_clear_explicit): Same.
* include/bits/atomic_2.h (__atomic2::atomic_flag): Public derivation.
Remove value type constructor.
* include/bits/atomic_0.h (__atomic0::atomic_flag): Same.
* include/std/future (_Future_state): Use ATOMIC_FLAG_INIT to
initialized the atomic_flag member.
From-SVN: r152895
2009-10-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/41648
PR fortran/41656
* trans-expr.c (select_class_proc): Convert the expression for the
vindex, carried on the first member of the esym list.
* gfortran.h : Add the vindex field to the esym_list structure.
and eliminate the class_object field.
* resolve.c (check_class_members): Remove the setting of the
class_object field.
(vindex_expr): New function.
(get_class_from_expr): New function.
(resolve_class_compcall): Call the above to find the ultimate
class or derived component. If derived, do not generate the
esym list. Add and expression for the vindex to the esym list
by calling the above.
(resolve_class_typebound_call): The same.
2009-10-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/41648
* gfortran.dg/dynamic_dispatch_4.f03 : New test.
PR fortran/41656
* gfortran.dg/dynamic_dispatch_5.f03 : New test.
From-SVN: r152890
2009-10-15 Steven G. Kargl <kargl@gcc.gnu.org>
* intrinsic.texi: Explicitly state that ETIME and DTIME take
REAL(4) arguments. Fix nearby typographically errors where
/leq was used instead of \leq.
From-SVN: r152854
* dwarf2out.c (dwarf_tag_name): Handle DW_TAG_rvalue_reference_type
and DW_TAG_template_alias.
(dwarf_attr_name): Handle DW_AT_main_subprogram,
DW_AT_data_bit_offset, DW_AT_const_expr, DW_AT_enum_class,
DW_AT_linkage_name, DW_AT_GNU_guarded_by, DW_AT_GNU_pt_guarded_by,
DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded, DW_AT_GNU_locks_excluded,
DW_AT_GNU_exclusive_locks_required, DW_AT_GNU_shared_locks_required
and DW_AT_GNU_odr_signature.
(dwarf_form_name): Handle DW_FORM_sec_offset, DW_FORM_exprloc,
DW_FORM_flag_present and DW_FORM_ref_sig8.
(output_signature): Only print name on the first byte.
(output_die): Likewise for dw_val_class_data8.
* include/dwarf2.h (DW_LANG_Python): Add comment that it is
a DWARF 4 addition.
From-SVN: r152853
2009-10-15 Richard Guenther <rguenther@suse.de>
PR lto/41668
* gimple.c (compare_type_names_p): Handle anonymous names
differently based on new mode argument.
(gimple_types_compatible_p): For structs also compare the tags.
(iterative_hash_type_name): Rename to ...
(iterative_hash_name): ... this. Hash all names.
(iterative_hash_gimple_type): Fix hashing the struct tag of
pointer targets. Hash field decl names.
From-SVN: r152851
2009-10-15 Rafael Avila de Espindola <espindola@google.com>
* lto-plugin.c (resolution_file): New.
(free_1): Update comment.
(free_2): Free resolution_file.
(write_resolution): Write resolution to specified file. Use the
syms array from the symbol table.
(all_symbols_read_handler): Delay call to free_1 past call to
write_resolution.
(process_option): Add a -resolution option.
From-SVN: r152846
2009-10-14 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/basic_string.h (operator+=(initializer_list<>),
append(initializer_list<>)): Forward to the append overload taking
a const CharT* pointer and a size, thus avoiding instantiating
unnecessarily in the built library the overload taking a pair of
iterators.
(operator=(initializer_list<>), assign(initializer_list<>)): Likewise
for assign.
(insert(iterator, initializer_list<>): Likewise for insert.
From-SVN: r152794
2009-10-14 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/c++config: Do not disable extern templates for string
in plain parallel-mode and in profile-mode; add comment explaining
_GLIBCXX_EXTERN_TEMPLATE == -1.
* testsuite/ext/profile/mutex_extensions.cc: Adjust dg-error line.
From-SVN: r152790
2009-10-14 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/c++config: Do not disable extern templates for string
in plain parallel-mode and in profile-mode; add comment explaining
_GLIBCXX_EXTERN_TEMPLATE == -1.
From-SVN: r152789
2009-09-26 Vladimir Makarov <vmakarov@redhat.com>
* params.def (PARAM_IRA_LOOP_RESERVED_REGS): New.
* params.h (IRA_LOOP_RESERVED_REGS): New
* tree-pass.h (pass_subregs_of_mode_init,
pass_subregs_of_mode_finish): Remove.
* passes.c (pass_subregs_of_mode_init,
pass_subregs_of_mode_finish): Remove.
(pass_reginfo_init): Move before loop optimizations.
* config/i386/i386.h (STACK_REG_COVER_CLASS): Define.
* common.opt (fira-loop-pressure): New.
* toplev.h (flag_ira_loop_pressure): New.
* rtl.h (init_subregs_of_mode, finish_subregs_of_mode): New
externals.
* reginfo.c (init_subregs_of_mode, finish_subregs_of_mode):
Make external and void type functions.
(gate_subregs_of_mode_init, pass_subregs_of_mode_init,
pass_subregs_of_mode_finish): Remove.
* ira-costs.c (init_costs): Call init_subregs_of_mode.
* regmove.c: Include ira.h.
(regmove_optimize): Call ira_set_pseudo_classes after IRA based
register pressure calculation in loops.
* loop-invariant.c: Include REGS_H and ira.h.
(struct loop_data): New members max_reg_pressure, regs_ref, and
regs_live.
(struct invariant): New member orig_regno.
(curr_loop): New variable.
(find_exits): Initialize regs_ref and regs_live.
(create_new_invariant): Initialize orig_regno.
(get_cover_class_and_nregs): New.
(get_inv_cost): Make aregs_needed an array. Use regs_needed as an
array. Add code for flag_ira_loop_pressure.
(gain_for_invariant): Make new_regs an array. Add code for
flag_ira_loop_pressure.
(best_gain_for_invariant): Ditto.
(set_move_mark): New parameter gain. Use it for debugging output.
(find_invariants_to_move): Make regs_needed and new_regs an array.
Add code for flag_ira_loop_pressure.
(move_invariant_reg): Set up orig_regno.
(move_invariants): Set up reg classes for pseudos for
flag_ira_loop_pressure.
(free_loop_data): Clear regs_ref and regs_live.
(curr_regs_live, curr_reg_pressure, regs_set, n_regs_set,
get_regno_cover_class, change_pressure, mark_regno_live,
mark_regno_death, mark_reg_store, mark_reg_clobber,
mark_reg_death, mark_ref_regs, calculate_loop_reg_pressure): New.
(move_loop_invariants): Calculate pressure. Initialize curr_loop.
* ira.c (ira): Call ira_set_pseudo_classes after IRA based
register pressure calculation in loops if new regs were added.
Call finish_subregs_of_mode.
* opts.c (decode_options): Set up flag_ira_loop_pressure.
* Makefile.in (loop-invariant.o): Add ira.h.
(regmove.o): Ditto.
* doc/invoke.texi (-fira-loop-pressure, ira-loop-reserved-regs):
Describe.
* doc/tm.texi (STACK_REG_COVER_CLASS): Describe.
From-SVN: r152770
2009-10-14 Richard Guenther <rguenther@suse.de>
* lto-symtab.c (lto_symtab_compatible): Fold in ...
(lto_symtab_merge): ... here. Rewrite both to take the
prevailing and a to-be-merged entry and to queue diagnostics
properly.
(lto_symtab_resolve_replaceable_p): New predicate for
symbol resolution.
(lto_symtab_resolve_can_prevail_p): Likewise.
(lto_symtab_resolve_symbols): Rewrite. Fold in code that
handles merging commons by choosing the largest decl. Fold
in code that gives ODR errors.
(lto_symtab_merge_decls_2): Simplify a lot. Emit queued
diagnostics here.
(lto_symtab_merge_decls_1): Re-structure. Deal with the
case of no prevailing decl here. Diagnose mismatches
in object types here. Drop all but the prevailing decls.
(lto_symtab_prevailing_decl): Return the single prevailing decl.
* lto-streamer-in.c (lto_input_tree_ref): Deal with
VIEW_CONVERT_EXPRs in decl slots. Unshare the tree in this case.
lto/
* lto.c (lto_fixup_tree): In case the prevailing decl is not
compatible with the one we replace wrap it around a
VIEW_CONVERT_EXPR.
From-SVN: r152768
* gcc/doc/extended.texi: Replace the dash character with
@minus{} in situations where it is being used as a minus
symbol.
* gcc/doc/tm.texi: Likewise.
* gcc/doc/invoke.texi: Likewise.
* gcc/doc/md.texi: Likewise.
From-SVN: r152765