2006-01-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/22146
* trans-array.c (gfc_reverse_ss): Remove static attribute.
(gfc_walk_elemental_function_args): Replace gfc_expr * argument for
the function call with the corresponding gfc_actual_arglist*. Change
code accordingly.
(gfc_walk_function_expr): Call to gfc_walk_elemental_function_args
now requires the actual argument list instead of the expression for
the function call.
* trans-array.h: Modify the prototype for gfc_walk_elemental_function_args
and provide a prototype for gfc_reverse_ss.
* trans-stmt.h (gfc_trans_call): Add the scalarization code for the case
where an elemental subroutine has array valued actual arguments.
PR fortran/25029
PR fortran/21256
PR fortran/20868
PR fortran/20870
* resolve.c (check_assumed_size_reference): New function to check for upper
bound in assumed size array references.
(resolve_assumed_size_actual): New function to do a very restricted scan
of actual argument expressions of those procedures for which incomplete
assumed size array references are not allowed.
(resolve_function, resolve_call): Switch off assumed size checking of
actual arguments, except for elemental procedures and intrinsic
inquiry functions, in some circumstances.
(resolve_variable): Call check_assumed_size_reference.
2006-01-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/22146
* gfortran.dg/elemental_subroutine_1.f90: New test.
* gfortran.dg/elemental_subroutine_2.f90: New test.
PR fortran/25029
PR fortran/21256
* gfortran.dg/assumed_size_refs_1.f90: New test.
PR fortran/20868
PR fortran/20870
* gfortran.dg/assumed_size_refs_2.f90: New test.
* gfortran.dg/initialization_1.f90: Change warning message.
From-SVN: r109449
* gcj.texi (Arrays): Added more documentation for
JvNewObjectArray.
(Primitive types): Correct information about primitive classes.
(Reference types): New node.
(Index): New node.
From-SVN: r109432
PR tree-optimization/18527
* tree-ssa-loop-niter.c (number_of_iterations_cond,
number_of_iterations_special, number_of_iterations_exit):
Move base and step of an iv to a single structure. Add
no_overflow flag, and use it in # of iterations analysis.
* tree-scalar-evolution.c (analyze_scalar_evolution_in_loop): Add
folded_casts argument.
(simple_iv): Pass base and step in a structure. Set no_overflow
flag.
(scev_const_prop): Add argument to analyze_scalar_evolution_in_loop.
Evaluate expensiveness of computing # of iterations instead of
the final expression.
* tree-scalar-evolution.h (affine_iv): New structure.
(simple_iv): Declaration changed.
* tree-chrec.c (chrec_apply): Handle chrecs containing symbols.
* tree-ssa-loop-ivopts.c (determine_biv_step, find_givs_in_stmt_scev,
find_givs_in_stmt): Changed due to simple_iv change.
* gcc.dg/tree-ssa/loop-15.c: New test.
From-SVN: r109427
2005-12-26 Anthony Green <green@redhat.com>
* gnu/java/nio/SocketChannelImpl.java (read): Compute the right amount
of data to read (dst.remaining()).
* gnu/java/nio/DatagramChannelImpl.java (receive): Ditto.
2005-11-11 Mark Wielaard <mark@klomp.org>
Reported by john.zigman@anu.edu.au as bug #24608.
* gnu/java/nio/SocketChannelImpl.java (read): Put readBytes in
destination ByteBuffer when it doesn't have an array instead of len
bytes.
From-SVN: r109422
2006-01-06 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/25528
* tree-ssa-alias.c (find_used_portions): Handle REALPART_EXPR
and IMAGPART_EXPR.
* tree-flow-inline.h (var_can_have_subvars): Handle complex types
on non gimple variables. Also add checks at the top for decls and
mtags.
* tree-ssa-structalias.c (push_fields_onto_fieldstack): Handle
complex types.
* tree-ssa-operands.c (parse_ssa_operands): Handle REALPART_EXPR
and IMAGPART_EXPR for creating MUST_DEFs.
(get_expr_operands): Handle SSA_NAME, STRUCT_FIELD_TAG, TYPE_MEMORY_TAG,
and NAME_MEMORY_TAG separately from the DECLs.
From-SVN: r109419
2006-01-06 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_bvector.h (vector<bool>::erase(iterator,
iterator)): Just use _M_erase_at_end.
2006-01-06 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_bvector.h (class vector<bool>): Move all the
helpers under protected access mode, consistently with the primary
vector template.
(vector<bool>::_M_erase_at_end): Add.
(erase(iterator, iterator), clear, resize, _M_fill_assign,
_M_assign_aux): Use it.
* testsuite/23_containers/vector/bool/modifiers/erase/1.cc: New.
2006-01-06 Paolo Carlini <pcarlini@suse.de>
Implement Option 3 of DR 431 for vector<bool>.
* include/bits/stl_bvector.h (class _Bvector_base): Change to
a struct, consistently with the primary vector template.
(class vector<bool>): Adjust to protected inheritance, tidy
typedefs.
(_Bvector_base<>::_M_get_Bit_allocator): Add.
(vector<bool>::vector(const vector&)): Use it.
(_Bvector_base<>::get_allocator): Tidy.
(vector<bool>::swap): Use __alloc_swap.
* testsuite/23_containers/vector/bool/modifiers/swap/1.cc: New.
* testsuite/23_containers/vector/bool/modifiers/swap/2.cc: New.
From-SVN: r109415
2006-01-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/25598
* io/file_pos.c (unformatted_backspace): Assure the new file position
to seek is not less than zero.
(st_backspace): Set unit bytes_left to zero.
* io/transfer.c (next_record_r): Fix line lengths, no functional change.
Fix date on ChangeLog
From-SVN: r109408
2006-01-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/25598
* io/file_pos.c (unformatted_backspace): Assure the new file position
to seek is not less than zero.
(st_backspace): Set unit bytes_left to zero.
* io/transfer.c (next_record_r): Fix line lengths, no functional change.
From-SVN: r109405
2006-01-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/24268
* io.c (next_char_not_space): New function that returns the next
character that is not white space.
(format_lex): Use the new function to skip whitespace within
a format string.
From-SVN: r109402
gcc/
2006-01-05 Carlos O'Donell <carlos@codesourcery.com>
* c-typeck.c (build_c_cast): Always warn when casting
from a pointer to an integer of different size, even if
the node was constant.
gcc/testsuite
2006-01-05 Carlos O'Donell <carlos@codesourcery.com>
* gcc.dg/cast-1.c: Add new warning.
* gcc.dg/cast-2.c: Likewise.
* gcc.dg/cast-3.c: Likewise.
* gcc.dg/format/cast-1.c: Likewise.
* gcc.dg/cast-4.c: New testcase.
From-SVN: r109386
2006-01-05 Richard Guenther <rguenther@suse.de>
PR tree-optimization/22555
* tree-ssa-alias.c (create_overlap_variables_for): Do not give up,
if one structure field is an array.
* tree-ssa-operands.c (get_expr_operands): Continue scanning
operands even if we found a subvar, but ignore VOPs in this
case.
* tree-ssa-loop-ivopts.c (rewrite_use): Mark new vars in stmt
for renaming.
* tree-ssa-loop.c (pass_iv_optimize): Schedule TODO_update_ssa.
* gcc.dg/tree-ssa/alias-3.c: New testcase.
From-SVN: r109381
2006-01-05 Richard Guenther <rguenther@suse.de>
* tree-flow.h (struct fieldoff): Decompose field to
type, size and decl.
* tree-ssa-alias.c (create_sft): Take type as parameter.
(create_overlap_variables_for): Store type, size and decl
in the fieldoff structure.
* tree-ssa-structalias.c (fieldoff_compare): Adjust users
of struct fieldoff.
(push_fields_onto_fieldstack): Likewise.
(create_variable_info_for): Likewise. Use offset for the
SFT name if the decl is not available.
From-SVN: r109376
2006-01-05 Erik Edelmann <eedelman@gcc.gnu.org>
PR fortran/23675
* expr.c (gfc_expr_set_symbols_referenced): New function.
* gfortran.h: Add a function prototype for it.
* resolve.c (resolve_function): Use it for
use associated character functions lengths.
* expr.c, gfortran.h, resolve.c: Updated copyright years.
testsuite/
2006-01-05 Erik Edelmann <eedelman@gcc.gnu.org>
PR fortran/23675
gfortran.dg/char_result_11.f90: New.
From-SVN: r109368
2006-01-04 Chris Lattner <sabre@gnu.org>
* typeck2.c: update copyright to 2006
(split_nonconstant_init_1): Set TREE_CONSTANT to true.
From-SVN: r109348