2010-03-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/43291
PR fortran/43326
* resolve.c (resolve_compcall): Add new boolean dummy argument
'class_members'. Only resolve expression at end if false.
Remove redundant, static variable 'class_object'.
(check_class_members): Add extra argument to call of
resolve_compcall.
(resolve_typebound_function): Renamed resolve_class_compcall.
Do all the detection of class references here. Correct calls to
resolve_compcall for extra argument.
(resolve_typebound_subroutine): resolve_class_typebound_call
renamed. Otherwise same as resolve_typebound_function.
(gfc_resolve_expr): Call resolve_typebound_function.
(resolve_code): Call resolve_typebound_subroutine.
2010-03-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/43291
PR fortran/43326
* gfortran.dg/dynamic_dispatch_7.f03: New test.
From-SVN: r157411
* cselib.c (LONG_TERM_PRESERVED_VALUE_P): Remove.
(cselib_preserve_definitely, cselib_clear_preserve): Remove.
(cselib_preserve_only_values): Remove retain argument, don't
traverse hash table with cselib_{preserve_definitely,clear_preserve}.
* cselib.h (cselib_preserve_only_values): Remove retain argument.
* var-tracking.c (micro_operation): Move insn field before union.
Add DEF_VEC_O and DEF_VEC_ALLOC_O for this type.
(struct variable_tracking_info_def): Remove n_mos field, change
mos into a vector of micro_operations.
(count_uses, count_uses_1, count_stores, count_with_sets): Remove.
(bb_stack_adjust_offset, log_op_type, add_uses, add_stores,
compute_bb_dataflow, emit_notes_in_bb): Adjust for VTI (bb)->mos
changing into a vector.
(add_with_sets): Likewise. Ensure MO_VAL_USE uops from add_stores
come before all other uops generated by add_stores.
(vt_add_function_parameters): Adjust for cselib_preserve_only_values
argument removal.
(vt_initialize): Likewise. Adjust for VTI (bb)->mos changing into
a vector. Run just one pass over the bbs instead of separate counting
and computation phase.
(vt_finalize): Free VTI (bb)->mos vector instead of array.
From-SVN: r157403
PR debug/43329
* tree-inline.c (remap_decls): Put old_var rather than origin_var
into *nonlocalized_list vector.
* dwarf2out.c (gen_formal_parameter_die): Call decl_ultimate_origin
even if origin is non-NULL.
(gen_variable_die): Likewise.
(process_scope_var): Don't change origin.
(gen_decl_die): Likewise.
* tree-cfgcleanup.c (remove_forwarder_block): Check single_pred_p
before adding new edges instead of after it, fix moving over
debug stmts.
* gcc.dg/guality/pr43329-1.c: New test.
From-SVN: r157402
2010-03-11 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/43257
* tree.c (assign_assembler_name_if_neeeded): New function.
(free_lang_data_in_cgraph): Assembler name assignment moved to the
above new function.
* tree.h (assign_assembler_name_if_neeeded): Declare.
* cgraphunit.c (cgraph_analyze_function): Create an assembler name for
the function if needed.
* testsuite/g++.dg/torture/pr43257.C: New test.
From-SVN: r157393
2010-03-11 Chris Demetriou <cgd@google.com>
* Makefile.in (stmp-int-hdrs): Make include/unwind.h,
include/stdint-gcc.h, and include/stdint.h world-readable.
From-SVN: r157392
2010-03-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43255
* tree-vrp.c (process_assert_insertions_for): Do not insert
asserts for trivial conditions.
* gcc.c-torture/compile/pr43255.c: New testcase.
From-SVN: r157388
2010-03-11 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
PR tree-optimization/43280
* tree-ssa-math-opts.c (find_bswap_1): Modify symbolic number generation.
Move calculation of size out of the if branch.
(find_bswap): Modify compare number generation.
2010-03-11 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* gcc.dg/optimize-bswapdi-1.c: Add OpenSSL bswap variant.
* gcc.dg/pr43280.c: New testcase.
From-SVN: r157386
PR debug/43290
* reg-notes.def (REG_CFA_SET_VDRAP): New note.
* dwarf2out.c (dwarf2out_frame_debug_expr): Remove rule 20 - setting
of fde->vdrap_reg.
(dwarf2out_frame_debug): Handle REG_CFA_SET_VDRAP note.
(based_loc_descr): Only express drap or vdrap regno based expressions
using DW_OP_fbreg when not optimizing.
* config/i386/i386.c (ix86_get_drap_rtx): When not optimizing,
make the vDRAP = DRAP assignment RTX_FRAME_RELATED_P and add
REG_CFA_SET_VDRAP note.
PR debug/36728
* gcc.dg/guality/pr36728-1.c: New test.
* gcc.dg/guality/pr36728-2.c: New test.
From-SVN: r157363
PR tree-optimization/43236
* tree-loop-distribution.c (generate_memset_zero): Fix off-by-one
error in calculation of base address in reverse iteration case.
(generate_builtin): Take number of latch executions if the statement
is in the latch.
* gcc.c-torture/execute/pr43236.c: New.
From-SVN: r157339
PR middle-end/42859
* tree-eh.c: Include pointer-set.h.
(lower_eh_dispatch): Filter out duplicate case labels and
remove the unneeded edge when the label is unused. Return
true when some edges are removed.
(execute_lower_eh_dispatch): When any lowering resulted in
removing an edge, also delete unreachable blocks.
* g++.dg/eh/pr42859.C: New test.
From-SVN: r157337
PR debug/43293
* config/i386/t-i386 (i386.o): Depend on debug.h and dwarf2out.h.
* config/i386/i386.c: Include debug.h and dwarf2out.h.
(ix86_file_end): If dwarf2out_do_cfi_asm (), emit .cfi_startproc
and .cfi_endproc around the pic thunks.
(output_set_got): For TARGET_DEEP_BRANCH_PREDICTION pic, ensure
all queued unwind info register saves are saved before the call.
For !TARGET_DEEP_BRANCH_PREDICTION pic, ensure the call is
considered as sp-=4 for unwind info and the pop as sp+=4 which
also clobbers dest, but doesn't actually restore it.
From-SVN: r157325
PR debug/43299
* var-tracking.c (adjust_sets): New function.
(count_with_sets, add_with_sets): Use it.
(get_adjusted_src): New inline function.
(add_stores): Use it.
* gcc.dg/pr43299.c: New test.
From-SVN: r157316
PR debug/43293
* config/i386/t-i386 (i386.o): Depend on debug.h and dwarf2out.h.
* config/i386/i386.c: Include debug.h and dwarf2out.h.
(ix86_file_end): If dwarf2out_do_cfi_asm (), emit .cfi_startproc
and .cfi_endproc around the pic thunks.
(output_set_got): For TARGET_DEEP_BRANCH_PREDICTION pic, ensure
all queued unwind info register saves are saved before the call.
For !TARGET_DEEP_BRANCH_PREDICTION pic, ensure the call is
considered as sp-=4 for unwind info and the pop as sp+=4 which
also clobbers dest, but doesn't actually restore it.
From-SVN: r157314
2010-03-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/43265
* io/read.c: Include fbuf.h and unix.h to enable lower level I/O for
read_x. (read_x): Replace the use of read_sf with equivalent lower level
I/O, eliminating unneeded code and handling EOF and EOR conditions.
* io/io.h: Revise prototype for read_sf.
* io/transfer.c (read_sf): Delete no_error parameter and all uses of it.
(read_block_form): Likewise.
(next_record_r): Delete wrong code call to hit_eof.
From-SVN: r157310