* tree-pass.h (pass_build_cgraph_edges): Declare.
* cgraphunit.c (record_refernece): Move to cgraphbuild.c
(visited_nodes): Remove.
(cgraph_create_edges): Move to cgraphbuild.c; rename to
build_cgrpah_edges; make visited_nodes local.
(cgraph_process_new_functions): DO not call initialize_inline_failed.
(record_references_in_initializer): Move to cgraphbuild.c
(initialize_inline_failed, rebuild_cgraph_edges,
pass_rebuild_cgraph_edges): Move to cgraphbuild.c.
(verify_cgraph_node): Make visited_nodes local.
(cgraph_analyze_function): Do not call cgraph_create_edges and
initialize_inline_failed.
(cgraph_expand_function): Do not call cgraph_lower_function;
assert that function is already lowered.
* Makefile.in (cgraphbuild.o): New.
* passes.c (init_optimization_passes): Add pass_build_cgraph_edges
at the end of lowering passes.
From-SVN: r120527
* ifcvt.c (cond_move_convert_if_block): New function, code
factored out from...
(cond_move_process_if_block): ...here. Call the new function
on the THEN and ELSE blocks.
(merge_if_block): Do not copy global_live_at_end, merge_blocks
already takes care of this.
From-SVN: r120524
PR c++/19439
* class.c (add_method): Don't wait until template
instantiation time to complain about duplicate methods.
* g++.dg/template/duplicate1.C: New test
* g++.dg/template/memfriend6.C: Adjust error markers.
From-SVN: r120520
2007-01-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/30162
* io/unix.c (fd_flush): Don't seek if file is not seekable, defined as
s->file_length == -1.
(fd_alloc_w_at): Do not adjust file_length if file is not seekable.
(fd_seek): If not seekable, just return success.
(fd_truncate): If not seekable, no need to truncate. Return failure if
seek fails and the stream is not a pipe.
(fd_to_stream): Make test for non-seekable file more robust.
From-SVN: r120512
2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c/19978
* tree.h (TREE_OVERFLOW_P): New.
* c-typeck.c (parser_build_unary_op): Warn only if result
overflowed and operands did not.
(parser_build_binary_op): Likewise.
(convert_for_assignment): Remove redundant overflow_warning.
* c-common.c (overflow_warning): Don't check or set TREE_OVERFLOW.
cp/
* semantics.c (finish_unary_op_expr): Warn only if result
overflowed and operands did not.
testsuite/
* gcc.dg/multiple-overflow-warn-1.c: New.
* gcc.dg/multiple-overflow-warn-2.c: New.
* gcc.dg/overflow-warn-6.c: New.
* g++.dg/warn/multiple-overflow-warn-1.C: New.
From-SVN: r120505
2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* c-typeck.c (store_init_value): Split over two lines to follow
the GNU coding style.
From-SVN: r120504
* trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
array assignments split out from gfc_trans_assignment.
(gfc_trans_array_copy): New function to implement array to array
copies via calls to __builtin_memcpy.
(copyable_array_p): New helper function to identify an array of
simple/POD types, that may be copied/assigned using memcpy.
(gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
whole array assignments considered suitable by copyable_array_p.
Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
* gfortran.dg/array_memcpy_1.f90: New test case.
* gfortran.dg/array_memcpy_2.f90: Likewise.
From-SVN: r120503
* trans-array.c (gfc_conv_loop_setup): Test whether the loop
stride is one, to avoid fold_build2 introducing a useless
NON_LVALUE_EXPR node.
From-SVN: r120500
2007-01-05 Richard Guenther <rguenther@suse.de>
PR middle-end/27826
* tree.c (get_narrower): Do not construct COMPONENT_REFs
with mismatched types. Instead explicitly build a
conversion NOP_EXPR.
* g++.dg/opt/pr27826.C: New testcase.
From-SVN: r120498
2007-01-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23232
* decl.c (gfc_in_match_data, gfc_set_in_match_data): New
functions to signal that a DATA statement is being matched.
(gfc_match_data): Call gfc_set_in_match_data on entry and on
exit.
* gfortran.h : Add prototypes for above.
* expr.c (check_init_expr): Avoid check on parameter or
variable if gfc_in_match_data is true.
(gfc_match_init_expr): Do not call error on non-reduction of
expression if gfc_in_match_data is true.
PR fortran/27996
PR fortran/27998
* decl.c (gfc_set_constant_character_len): Add boolean arg to
flag array constructor resolution. Warn if string is being
truncated. Standard dependent error if string is padded. Set
new arg to false for all three calls to
gfc_set_constant_character_len.
* match.h : Add boolean arg to prototype for
gfc_set_constant_character_len.
* gfortran.h : Add warn_character_truncation to gfc_options.
* options.c (set_Wall): Set warn_character_truncation if -Wall
is set.
* resolve.c (resolve_code): Warn if rhs string in character
assignment has to be truncated.
* array.c (gfc_resolve_character_array_constructor): Set new
argument to true for call to gfc_set_constant_character_len.
2007-01-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23232
* gfortran.dg/data_implied_do_1.f90: New test.
PR fortran/27996
PR fortran/27998
* gfortran.dg/char_length_1.f90: New test.
From-SVN: r120485
2007-01-04 Douglas Gregor <doug.gregor@gmail.com>
* pt.c (tsubst): Propagate the need for structural equality checks
when reducing the level of template parameters.
From-SVN: r120483
* tree-optimize.c (execute_fixup_cfg): Correct previously mistakely
comitted older version of patch.
(pass_fixup_cfg): Add TODOs to verify flow and statements, dump
function, celanup cfg and collect garbage.
From-SVN: r120469
2007-01-04 Eric Christopher <echristo@apple.com>
* libgcc2.c (__bswapsi2): Use SItype.
(__bswapdi2): Use DItype.
* libgcc2.h: Update for above.
From-SVN: r120454
* fold-const.c (fold_convert): When casting an expression to void,
fold_ignored_result may discover a GIMPLE_MODIFY_STMT which doesn't
have a type. Instead of attempting to build a NOP_EXPR, return
these "special" trees directly.
From-SVN: r120451
* gfortran.texi: Update copyright to include 2007.
* intrinsic.texi: Update copyright to include 2007.
* invoke.texi: Update copyright to include 2007.
From-SVN: r120444
* config/rs6000/rs6000.c (rs6000_rtx_costs): Make adjustment for
MULT inside MINUS as either argument. Use rs6000_cost->dmul -
rs6000_cost->fp not 0 as adjustment for outer NEG.
From-SVN: r120442