2011-04-10 Jim Meyering <meyering@redhat.com>
Avoid memory overrun in a test leading to potential double-free.
* testsuite/test-expandargv.c (writeout_test): Fix off-by-one error:
i.e., do copy the trailing NUL byte.
From-SVN: r172246
2011-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/48448
* gfortran.h (gfc_option_t): Add warn_function_elimination and
flag_frontend_optimize.
* lang.opt (Wfunction-elimination): Add.
(ffrontend-optimize): Add.
* invoke.texi: Add documentation for -Wfunction-elimination
and -ffrontend-optimize. Add -faggressive-function-elimination
to list of code generation options.
* frontend-passes.c (gfc_run_passes): Run optimizations if
flag_frontend_optimize is set.
(warn_function_elimination): New function.
(cfe_expr_0): Call it if requested to do so.
* options.c (gfc_init_options): Initiate warn_function_elimination
and flag_frontend_optimize.
(gfc_post_options): Set flag_frontend_optimize if not specified
by user, depending on the optimization level.
(gfc_handle_option): Handle -Wfunction-elimination and
-ffrontend-optimize.
2011-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/48448
* gfortran.dg/function_optimize_5.f90: New test.
From-SVN: r172215
2011-04-08 Steven G. Kargl <kargl@gcc.gnu.org>
PR 47829
gcc/config.gcc: disable unwind table generation for crtbegin/crtend
on i386-*-freebsd.
From-SVN: r172211
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
alignment on fields of the RETURN type built for the Copy-In Copy-Out
mechanism.
From-SVN: r172210
2011-04-08 Basile Starynkevitch <basile@starynkevitch.net>
* gengtype.c (write_typed_alloc_def): New argument f. Use it instead
of header_file.
(write_typed_struct_alloc_def, write_typed_typedef_alloc_def)
(write_typed_alloc_defns): Likewise.
(main): Calls write_typed_alloc_defns with output_header.
From-SVN: r172203
2011-04-08 Vladimir Makarov <vmakarov@redhat.com>
PR 4435
* ira-color.c (setup_profitable_hard_regs): Add comments.
Don't take prohibited hard regs into account.
(setup_conflict_profitable_regs): Rename to
get_conflict_profitable_regs.
(check_hard_reg_p): Check prohibited hard regs.
From-SVN: r172201
PR target/48366
* config/pa/pa.c (hppa_register_move_cost): Increase to 18 cost of
move from floating point to shift amount register .
(emit_move_sequence): Remove secondary reload support for floating
point to shift amount amount register copies.
(pa_secondary_reload): Return GENERAL_REGS for floating point/shift
amount register copies.
* config/pa/pa32-regs.h (HARD_REGNO_MODE_OK): For shift amount
register, return false if mode isn't a scalar integer mode.
* config/pa/pa64-regs.h (HARD_REGNO_MODE_OK): Likewise.
From-SVN: r172197
2011-04-08 Richard Guenther <rguenther@suse.de>
* gimple.c (gimple_set_modified): Do not queue calls to
MODIFIED_NORETURN_CALLS here ...
* tree-ssa-operands.c (update_stmt_operands): ... but here.
From-SVN: r172182
2011-04-08 Richard Guenther <rguenther@suse.de>
PR lto/48467
* toplev.c (lang_dependent_init): Do not open asm_out_file
in WPA mode, nor perform debug machinery initialization.
(finalize): Do not unlink asm_out_file in WPA mode.
From-SVN: r172181
PR rtl-optimization/48235
* sel-sched.c (code_motion_process_successors): Recompute the last
insn in basic block if control flow changed.
(code_motion_path_driver): Ditto. Recompute the first insn as well.
Update condition for ilist_remove.
testsuite:
* gcc.dg/pr48235.c: New.
From-SVN: r172177
PR rtl-optimization/48302
* sel-sched-ir.h (sel_add_loop_preheaders): Update prototype.
* sel-sched-ir.c (sel_add_loop_preheaders): Add 'bbs' argument. Use
it to record added preheader blocks.
* sel-sched.c (setup_current_loop_nest): Add 'bbs' argument. Pass it
on to sel_add_loop_preheaders.
(sel_region_init): Move call to setup_current_loop_nest after
sel_init_bbs.
testsuite:
* g++.dg/opt/pr48302.C: New.
From-SVN: r172176
PR tree-optimization/48377
* tree-vect-data-refs.c (vector_alignment_reachable_p): Set
is_packed to true even for types with smaller TYPE_ALIGN than
TYPE_SIZE.
* gcc.dg/vect/pr48377.c: New test.
From-SVN: r172172
* config/arm/arm-protos.h (arm_attr_length_push_multi): New prototype.
* config/arm/arm.c (arm_attr_length_push_multi): New function.
* config/arm/arm.md (*push_multi): Change the length computation to
call a C function.
From-SVN: r172169
PR c++/48481
* tree.c (build_overload): Allow an unwrapped FUNCTION_DECL
at the end of the chain.
* pt.c (dependent_template_p): Use OVL_CURRENT/NEXT.
(iterative_hash_template_arg): Likewise.
From-SVN: r172164